/** * Add a call to action (button) to the alert message * * @param string $text * @param string $url * @param string $class * @param array $parameters * @return \Styde\Html\Alert\Message $this */ public function button($text, $url, $class = 'default', $parameters = array()) { $this->message['buttons'][] = array('text' => $this->container->translate($text, $parameters), 'url' => $url, 'class' => $class); return $this; }
/** * Attempts to translate texts if the translator component is set and the * lang key is found, otherwise returns the original text. * * @param $text * @param array $parameters * @return string * @static */ public static function translate($text, $parameters = array()) { return \Styde\Html\Alert\Container::translate($text, $parameters); }