/** * {@inheritdoc} */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); $form['text']['#title'] = $this->t('Link label'); $form['text']['#required'] = TRUE; $form['text']['#default_value'] = empty($this->options['text']) ? $this->getDefaultLabel() : $this->options['text']; }
/** * {@inheritdoc} */ protected function renderLink(ResultRow $row) { /** @var \Drupal\support_ticket\SupportTicketInterface $support_ticket */ $support_ticket = $this->getEntity($row); if (!$support_ticket->getRevisionId()) { return ''; } $text = parent::renderLink($row); $this->options['alter']['query'] = $this->getDestinationArray(); return $text; }
/** * {@inheritdoc} */ protected function renderLink(ResultRow $row) { /** @var \Drupal\node\NodeInterface $node */ $node = $this->getEntity($row); if (!$node->getRevisionid()) { return ''; } $text = parent::renderLink($row); $this->options['alter']['query'] = $this->getDestinationArray(); return $text; }
/** * {@inheritdoc} */ protected function renderLink(ResultRow $row) { $this->options['alter']['query'] = $this->getDestinationArray(); return parent::renderLink($row); }
/** * {@inheritdoc} */ public function render(ResultRow $row) { return $this->getEntity($row) ? parent::render($row) : []; }