当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminHelper::tabularInputCkEditorSortableStart方法代码示例

本文整理汇总了PHP中AdminHelper::tabularInputCkEditorSortableStart方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::tabularInputCkEditorSortableStart方法的具体用法?PHP AdminHelper::tabularInputCkEditorSortableStart怎么用?PHP AdminHelper::tabularInputCkEditorSortableStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AdminHelper的用法示例。


在下文中一共展示了AdminHelper::tabularInputCkEditorSortableStart方法的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}"));
 }
开发者ID:kostya1017,项目名称:our,代码行数:39,代码来源:AdminBlocsWidget.php

示例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');
开发者ID:kostya1017,项目名称:our,代码行数:30,代码来源:admin.php


注:本文中的AdminHelper::tabularInputCkEditorSortableStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。