protected function initialize(array $options = array()) { parent::initialize($options); $this->addAttributeToRemove(array('external_blank')); $this->uri = $this->resource->getSubject(); if ($this->options['external_blank'] && 0 !== strncmp($this->uri, $this->requestContext['absolute_url_root'], strlen($this->requestContext['absolute_url_root'])) && 0 !== strncmp($this->uri, $this->requestContext['prefix'], strlen($this->requestContext['prefix']))) { $this->target('_blank'); } }
protected function initialize(array $options = array()) { parent::initialize($options); $this->page = $this->resource->getSubject(); if (!$this->page instanceof DmPage) { throw new dmException(sprintf('%s is not a valid DmPage', $this->page)); } $this->setOption('tag', 'a'); if ($this->options['use_page_title']) { $this->title($this->page->_getI18n('title')); } $this->addAttributeToRemove(array('use_page_title')); }
protected function initialize(array $options = array()) { parent::initialize($options); $this->route = $this->resource->getSubject(); }