Пример #1
0
 protected function process()
 {
     $requirements = WelcomeRequirements::get();
     $rendered_requirements = $requirements->render();
     $this->response['requirements_element'] = $rendered_requirements;
     if ($rendered_requirements) {
         return;
     }
     $this->response->message = t('panel.welcome.success');
     return parent::process();
 }
Пример #2
0
 public function __construct()
 {
     $action = new Button("Let's go!", array('class' => 'btn btn-large', 'type' => 'submit'));
     parent::__construct('div', array(PanelDecorator::TITLE => t('panel.welcome.title'), PanelDecorator::DESCRIPTION => t('panel.welcome.description', array('action' => $action)), Element::CHILDREN => array(WelcomeRequirements::get()->render()), 'name' => 'welcome', 'data-message' => t('panel.welcome.success')));
 }