options['custom_access']; } /** * {@inheritdoc} */ public function defineOptions() { $options = parent::defineOptions(); $options['string'] = ['default' => '']; $options['custom_access'] = ['default' => TRUE]; return $options; } /** * {@inheritdoc} */ public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); $this->globalTokenForm($form, $form_state); } /** * {@inheritdoc} */ public function render($empty = FALSE) { if (!$empty || !empty($this->options['empty'])) { return [ '#markup' => $this->globalTokenReplace($this->options['string']), ]; } return []; } }