_urlrewriteSelector = $urlrewriteSelector; parent::__construct($context, $data); } /** * Set custom labels and headers * * @return void */ protected function _construct() { $this->_headerText = __('URL Rewrite Management'); $this->_addButtonLabel = __('Add URL Rewrite'); parent::_construct(); } /** * Customize grid row URLs * * @return string */ public function getCreateUrl() { $url = $this->getUrl('adminhtml/*/edit'); $selectorBlock = $this->getSelectorBlock(); if ($selectorBlock === null) { $selectorBlock = $this->_urlrewriteSelector; } if ($selectorBlock) { $modes = array_keys($selectorBlock->getModes()); $url .= reset($modes); } return $url; } }