コード例 #1
0
ファイル: Message.php プロジェクト: mcarral/html
 /**
  * Creates a new Alert Message instance and adds it to the container.
  *
  * Messages will be typically created from the Alert Container message
  * method, via the magic methods, or by using the facade Alert::message()
  * which of course references the Alert Container.
  *
  * @param Container $container
  * @param string $message
  * @param string $type
  * @param array $args
  */
 public function __construct(Container $container, $message = '', $type = 'success', array $args = [])
 {
     $this->container = $container;
     $this->message = ['message' => $this->container->translate($message, $args), 'type' => $type];
     $this->container->add($this);
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: VictorAvelar/sfg
 /**
  * Adds a new message to the container's collection
  *
  * @param $message
  * @return \Styde\Html\Alert\Message 
  * @static 
  */
 public static function add($message)
 {
     return \Styde\Html\Alert\Container::add($message);
 }