See also:
Inheritance: extends CWidget
 /**
  * Initializes the widget
  */
 public function init()
 {
     // Generate a unique ID. We can't rely on the built-in counter in
     // CWidget::getId() because these modals may be rendered from AJAX
     // request and the counter will be zero then
     $this->id = uniqid($this->getId());
     parent::init();
     TbHtml::addCssClass('watch-modal', $this->htmlOptions);
     $this->header = Yii::t('Movies', 'Watch / Download');
 }
示例#2
0
 public function run()
 {
     if ($this->buttons == null) {
         $this->buttons = array(array('type' => 'primary', 'label' => O::t('oprecx', 'OK'), 'url' => '#', 'htmlOptions' => array('data-dismiss' => 'modal')), array('label' => O::t('oprecx', 'Cancel'), 'url' => '#', 'htmlOptions' => array('data-dismiss' => 'modal')));
     }
     echo '</div><div class="modal-footer">';
     foreach ($this->buttons as $btn) {
         $this->controller->widget('bootstrap.widgets.TbButton', $btn);
     }
     echo '</div>';
     parent::run();
 }
 public function run()
 {
     $this->render('template_modal', ['types' => $this->types, 'orderId' => $this->orderId]);
     parent::run();
 }
示例#4
0
 /**
  * Widget's run method
  */
 public function run()
 {
     parent::run();
     $this->registerPluginFiles();
 }