|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / dev2.destoffenstraat.com / app / code / MageArray / News / Block / Adminhtml / Newspost / |
Filename | /home/dev2.destoffenstraat.com/app/code/MageArray/News/Block/Adminhtml/Newspost/Edit.php |
Size | 1.79 kb |
Permission | rwxrwxrwx |
Owner | root : root |
Create time | 17-Aug-2025 10:26 |
Last modified | 06-Apr-2021 18:06 |
Last accessed | 23-Aug-2025 00:44 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
namespace MageArray\News\Block\Adminhtml\Newspost;
use Magento\Backend\Block\Widget\Context;
use Magento\Backend\Block\Widget\Form\Container;
use Magento\Framework\Registry;
/**
* Class Edit
* @package MageArray\News\Block\Adminhtml\Newspost
*/
class Edit extends Container
{
/**
* @var Registry
*/
protected $_coreRegistry;
/**
* Edit constructor.
* @param Context $context
* @param Registry $registry
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
array $data = []
) {
$this->_coreRegistry = $registry;
parent::__construct($context, $data);
}
/**
*
*/
protected function _construct()
{
$this->_objectId = 'newspost_id';
$this->_blockGroup = 'MageArray_News';
$this->_controller = 'adminhtml_newspost';
parent::_construct();
$this->buttonList->update('save', 'label', __('Save Post'));
$this->buttonList->update('delete', 'label', __('Delete'));
$this->buttonList->add(
'save_and_continue',
[
'label' => __('Save and Continue Edit'),
'class' => 'save',
'data_attribute' => [
'mage-init' => [
'button' => [
'event' => 'saveAndContinueEdit',
'target' => '#edit_form'
],
],
],
],
10
);
}
/**
* @return string
*/
protected function _getSaveAndContinueUrl()
{
return $this->getUrl(
'*/*/save',
['_current' => true, 'back' => 'edit', 'tab' => '{{tab_id}}']
);
}
}
namespace MageArray\News\Block\Adminhtml\Newspost;
use Magento\Backend\Block\Widget\Context;
use Magento\Backend\Block\Widget\Form\Container;
use Magento\Framework\Registry;
/**
* Class Edit
* @package MageArray\News\Block\Adminhtml\Newspost
*/
class Edit extends Container
{
/**
* @var Registry
*/
protected $_coreRegistry;
/**
* Edit constructor.
* @param Context $context
* @param Registry $registry
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
array $data = []
) {
$this->_coreRegistry = $registry;
parent::__construct($context, $data);
}
/**
*
*/
protected function _construct()
{
$this->_objectId = 'newspost_id';
$this->_blockGroup = 'MageArray_News';
$this->_controller = 'adminhtml_newspost';
parent::_construct();
$this->buttonList->update('save', 'label', __('Save Post'));
$this->buttonList->update('delete', 'label', __('Delete'));
$this->buttonList->add(
'save_and_continue',
[
'label' => __('Save and Continue Edit'),
'class' => 'save',
'data_attribute' => [
'mage-init' => [
'button' => [
'event' => 'saveAndContinueEdit',
'target' => '#edit_form'
],
],
],
],
10
);
}
/**
* @return string
*/
protected function _getSaveAndContinueUrl()
{
return $this->getUrl(
'*/*/save',
['_current' => true, 'back' => 'edit', 'tab' => '{{tab_id}}']
);
}
}