/** * 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'); }
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(); }
/** * Widget's run method */ public function run() { parent::run(); $this->registerPluginFiles(); }