本文整理汇总了PHP中AdminHelper::tabularInputCkEditorSortableStop方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::tabularInputCkEditorSortableStop方法的具体用法?PHP AdminHelper::tabularInputCkEditorSortableStop怎么用?PHP AdminHelper::tabularInputCkEditorSortableStop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminHelper
的用法示例。
在下文中一共展示了AdminHelper::tabularInputCkEditorSortableStop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Generates the TabularInputWidget and the javascript that drives the blocs.
*/
public function run()
{
// Preparing variables.
$layouts = array();
$layoutSelect = array();
$afterAddItem = '';
$beforeAddItem = '';
$afterInit = '';
$sortableStart = '';
$sortableStop = '';
$beforeDeleteItem = '';
$afterDeleteItem = '';
foreach (Yii::app()->params['blocs'] as $bloc) {
$modelClassName = 'Bloc' . ucfirst($bloc);
$newBlocModel = new $modelClassName();
$newBlocModel->title_anchor = true;
$newBlocModel->title_page = true;
$layouts['application.components.blocs.' . $bloc . '.views.admin'] = $newBlocModel;
$layoutSelect['application.components.blocs.' . $bloc . '.views.admin'] = Yii::t('admin', 'bloc_' . $bloc);
$afterAddItem .= Yii::app()->cms->blocs[$bloc]->afterAddItem() . "\n";
$beforeAddItem .= Yii::app()->cms->blocs[$bloc]->beforeAddItem() . "\n";
$afterInit .= Yii::app()->cms->blocs[$bloc]->afterInit() . "\n";
$sortableStart .= Yii::app()->cms->blocs[$bloc]->sortableStart() . "\n";
$sortableStop .= Yii::app()->cms->blocs[$bloc]->sortableStop() . "\n";
$beforeDeleteItem .= Yii::app()->cms->blocs[$bloc]->beforeDeleteItem() . "\n";
$afterDeleteItem .= Yii::app()->cms->blocs[$bloc]->afterDeleteItem() . "\n";
}
$renderData = array();
foreach ($this->models as $key => $models) {
if ($key !== 0) {
$renderData[$key] = $models;
}
}
// Instanciating widget.
$this->widget('application.components.widgets.TabularInput.TabularInputWidget', array('id' => $this->id, 'form' => isset($this->form) ? $this->form : null, 'models' => $this->models[0], 'layoutExpression' => "'application.components.blocs.'.lcfirst(mb_substr(get_class(\$model), 4)).'.views.admin'", 'layout' => $layouts, 'layoutSelect' => $layoutSelect, 'itemTitleExpression' => "Yii::t('admin', \$model->tableName())", 'orderAttribute' => 'rank', 'nestedWidgets' => array('{formId}-{itemId}-blocDocumentDocumentForm', '{formId}-{itemId}-blocPeoplePeopleForm', '{formId}-{itemId}-blocCitationCitationForm', '{formId}-{itemId}-blocFeatureFeatureForm'), 'renderData' => $renderData, 'sortable' => array('start' => "js:function(event, ui){\n\t\t\t\t\t" . AdminHelper::tabularInputCkEditorSortableStart() . "\n\t\t\t\t\t" . $sortableStart . "\n\t\t\t\t}", 'stop' => "js:function(event, ui){\n\t\t\t\t\t" . AdminHelper::tabularInputCkEditorSortableStop() . "\n\t\t\t\t\t" . $sortableStop . "\n\t\t\t\t}"), 'beforeDeleteItem' => "function(id, itemId){\n\t\t\t\t" . AdminHelper::tabularInputCkEditorBeforeDeleteItem() . "\n\t\t\t\t" . $beforeDeleteItem . "\n\t\t\t}", 'afterDeleteItem' => "function(id, itemId){\n\t\t\t\t" . $afterDeleteItem . "\n\t\t\t}", 'beforeAddItem' => "function(id, itemId){\n\t\t\t\t" . $beforeAddItem . "\n\t\t\t}", 'afterAddItem' => "function(id, itemId){\n\t\t\t\t" . AdminHelper::tabularInputAfterAddItemDatetimePicker() . "\n\t\t\t\t" . $afterAddItem . "\n\t\t\t}", 'afterInit' => "function(id){\n\t\t\t\t" . $afterInit . "\n\t\t\t}"));
}
示例2: array
<?php
echo $this->renderPartial('//adminLayouts/_blocHeader', array('form' => $form, 'model' => $model, 'formId' => $formId, 'itemId' => $itemId));
?>
<div class="form-group">
<?php
echo $form->labelEx($model, '[' . $formId . '][' . $itemId . ']layout', array('class' => 'control-label col-sm-3 col-xs-12'));
?>
<div class="col-sm-6 col-xs-12"><?php
echo $form->dropDownList($model, '[' . $formId . '][' . $itemId . ']layout', array('1' => 'Colonnes (adapté pour les textes courts)', '2' => 'Lignes (adapté pour les textes longs)'), array('empty' => '', 'class' => 'form-control'));
?>
</div>
<?php
echo $form->error($model, '[' . $formId . '][' . $itemId . ']layout', array('class' => 'error text-left col-sm-3 col-xs-12'));
?>
</div>
<fieldset>
<legend>Caractéristiques</legend>
<?php
$this->widget('application.components.widgets.TabularInput.TabularInputWidget', array('id' => $formId . '-' . $itemId . '-blocFeatureFeatureForm', 'form' => $form, 'layout' => array('application.components.blocs.feature.views.admin_featureFeature' => new BlocFeatureFeature()), 'models' => isset($blocFeatureFeature[$itemId]) ? $blocFeatureFeature[$itemId] : array(), 'itemTitleExpression' => "CHtml::encode(\$model->title)", 'orderAttribute' => 'rank', 'sortable' => array('start' => "js:function(event, ui){\n\t\t\t\t" . AdminHelper::tabularInputCkEditorSortableStart() . "\n\t\t\t}", 'stop' => "js:function(event, ui){\n\t\t\t\t" . AdminHelper::tabularInputCkEditorSortableStop() . "\n\t\t\t}")));
?>
</fieldset>
<?php
echo $form->hiddenField($model, '[' . $formId . '][' . $itemId . ']rank');