/** * Determines the correct class associated with the link. * * @param array $options options associated with the link. */ private function select_link_class(&$options) { is_null($options) ? $options = [] : null; if ($this->get_alert_link()) { $this->append_class($options, 'alert-link'); } elseif ($this->get_navbar_vertical()) { $this->append_class($options, 'navbar-brand'); } elseif ($this->get_dropdown_link()) { $options = array_merge($options, ['role' => 'menuitem']); } Base::set_alert_link(false); }
/** * Sets Base alert link flag to true to then catches the closure output. * * This behaviour is necessary because any link (<a></a> tag) within an alert box * have to match the correct color when it displayed. * * @param callable $block * @return type */ private function capture_alert(callable $block) { Base::set_alert_link(true); $capture = call_user_func($block); Base::set_alert_link(false); return $capture; }