本文整理汇总了PHP中CClipWidget::beginClip方法的典型用法代码示例。如果您正苦于以下问题:PHP CClipWidget::beginClip方法的具体用法?PHP CClipWidget::beginClip怎么用?PHP CClipWidget::beginClip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CClipWidget
的用法示例。
在下文中一共展示了CClipWidget::beginClip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderPortletHelper
protected function renderPortletHelper($uniqueLayoutId, $portletsAreCollapsible = true, $portletsAreMovable = true, $portletsAreRemovable = true)
{
assert('is_string($uniqueLayoutId)');
assert('is_bool($portletsAreCollapsible)');
assert('is_bool($portletsAreMovable)');
assert('is_bool($portletsAreRemovable)');
$juiPortletsWidgetItems = array();
foreach ($this->portlets as $column => $columnPortlets) {
foreach ($columnPortlets as $position => $portlet) {
$className = get_class($portlet->getView());
if (method_exists($className, 'canUserRemove')) {
$removable = $className::canUserRemove();
} else {
$removable = $portletsAreRemovable;
}
$additionalOptionMenuItems = array();
if (method_exists($className, 'getAdditionalOptionMenuItems')) {
$additionalOptionMenuItems = $className::getAdditionalOptionMenuItems();
}
if ($className == 'AgreementDetailsPortletView') {
$juiPortletsWidgetItems[$column][$position] = array('id' => $portlet->id, 'uniqueId' => $portlet->getUniquePortletPageId(), 'title' => $portlet->getTitle(), 'content' => $this::renderViewForAgreementWithAgmntProduct($portlet), 'headContent' => $portlet->renderHeadContent(), 'editable' => $portlet->isEditable(), 'collapsed' => $portlet->collapsed, 'removable' => $removable, 'uniqueClass' => $this->resolveUniqueClass($portlet), 'portletParams' => $portlet->getPortletParams(), 'additionalOptionMenuItems' => $additionalOptionMenuItems);
} else {
$juiPortletsWidgetItems[$column][$position] = array('id' => $portlet->id, 'uniqueId' => $portlet->getUniquePortletPageId(), 'title' => $portlet->getTitle(), 'content' => $portlet->renderContent(), 'headContent' => $portlet->renderHeadContent(), 'editable' => $portlet->isEditable(), 'collapsed' => $portlet->collapsed, 'removable' => $removable, 'uniqueClass' => $this->resolveUniqueClass($portlet), 'portletParams' => $portlet->getPortletParams(), 'additionalOptionMenuItems' => $additionalOptionMenuItems);
}
}
}
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("JuiPortlets");
$cClipWidget->widget('application.core.widgets.JuiPortlets', array('uniqueLayoutId' => $uniqueLayoutId, 'moduleId' => $this->moduleId, 'saveUrl' => Yii::app()->createUrl($this->moduleId . '/defaultPortlet/SaveLayout'), 'layoutType' => $this->getLayoutType(), 'items' => $juiPortletsWidgetItems, 'collapsible' => $portletsAreCollapsible, 'movable' => $portletsAreMovable));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['JuiPortlets'];
}
示例2: renderControlEditable
protected function renderControlEditable()
{
assert('$this->model instanceof ImportWizardForm');
assert('$this->attribute == null');
$existingFilesInformation = array();
if (!empty($this->model->fileUploadData)) {
$existingFilesInformation[] = $this->model->fileUploadData;
$existingFilesInformation[0]['id'] = $this->model->id;
}
$content = $this->renderDelimiterAndEnclosureContent($existingFilesInformation);
$inputNameAndId = $this->getEditableInputId('file');
$beforeUploadAction = "\$('#{$this->getEditableInputId('rowColumnDelimiter')}').attr('readonly', true);";
$beforeUploadAction .= "\$('#{$this->getEditableInputId('rowColumnDelimiter')}').addClass('readonly-field');";
$beforeUploadAction .= "\$('#{$this->getEditableInputId('rowColumnEnclosure')}').attr('readonly', true);";
$beforeUploadAction .= "\$('#{$this->getEditableInputId('rowColumnEnclosure')}').addClass('readonly-field');";
$afterDeleteAction = "\$('#{$this->getEditableInputId('rowColumnDelimiter')}').removeAttr('readonly');";
$afterDeleteAction .= "\$('#{$this->getEditableInputId('rowColumnDelimiter')}').removeClass('readonly-field');";
$afterDeleteAction .= "\$('#{$this->getEditableInputId('rowColumnEnclosure')}').removeAttr('readonly');";
$afterDeleteAction .= "\$('#{$this->getEditableInputId('rowColumnEnclosure')}').removeClass('readonly-field');";
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("filesElement");
$cClipWidget->widget('application.core.widgets.FileUpload', array('uploadUrl' => Yii::app()->createUrl("import/default/uploadFile", array('filesVariableName' => $inputNameAndId, 'id' => $this->model->id)), 'deleteUrl' => Yii::app()->createUrl("import/default/deleteFile"), 'inputName' => $inputNameAndId, 'inputId' => $inputNameAndId, 'hiddenInputName' => 'fileId', 'formName' => $this->form->id, 'existingFiles' => $existingFilesInformation, 'maxSize' => (int) InstallUtil::getMaxAllowedFileSize(), 'beforeUploadAction' => $beforeUploadAction, 'afterDeleteAction' => $afterDeleteAction));
$cClipWidget->endClip();
$content .= '<tr><td></td><td colspan="3"><div class="file-upload-box">' . $cClipWidget->getController()->clips['filesElement'] . '</div></td></tr>';
return $content;
}
示例3: renderContent
public function renderContent()
{
$accessContent = $this->resolveContentIfCurrentUserCanAccessChartByModule('OpportunitiesModule', 'OpportunitiesModulePluralLabel');
if ($accessContent != null) {
return $accessContent;
}
$chartDataProviderType = $this->getChartDataProviderType();
$chartDataProvider = ChartDataProviderFactory::createByType($chartDataProviderType);
ControllerSecurityUtil::resolveCanCurrentUserAccessModule($chartDataProvider->getModel()->getModuleClassName(), true);
$chartData = $chartDataProvider->getChartData();
Yii::import('ext.amcharts.AmChartMaker');
$amChart = new AmChartMaker();
$amChart->data = $chartData;
$amChart->id = $this->uniqueLayoutId;
$amChart->type = $this->resolveViewAndMetadataValueByName('type');
$amChart->addSerialGraph('value', 'column');
$amChart->xAxisName = $chartDataProvider->getXAxisName();
$amChart->yAxisName = $chartDataProvider->getYAxisName();
$amChart->yAxisUnitContent = Yii::app()->locale->getCurrencySymbol(Yii::app()->currencyHelper->getCodeForCurrentUserForDisplay());
$javascript = $amChart->javascriptChart();
Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $this->uniqueLayoutId, $javascript);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("Chart");
$cClipWidget->widget('application.core.widgets.AmChart', array('id' => $this->uniqueLayoutId));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['Chart'];
}
示例4: renderHtmlContent
protected function renderHtmlContent()
{
$emailMessageContent = $this->model->{$this->attribute};
$inputNameIdPrefix = $this->attribute;
$attribute = 'htmlContent';
// Begin Not Coding Standard
//remove tracking since it's not contact who opens the email.
$emailMessageContent->{$attribute} = preg_replace('|<img width="1" height="1" src="[^"]*" alt="[^"]*" />|i', '', $emailMessageContent->{$attribute});
// End Not Coding Standard
$id = $this->getEditableInputId($inputNameIdPrefix, $attribute);
$htmlOptions = array();
$htmlOptions['id'] = $id;
$htmlOptions['name'] = $this->getEditableInputName($inputNameIdPrefix, $attribute);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("Redactor");
// Begin Not Coding Standard
$cClipWidget->widget('application.core.widgets.Redactor', array('htmlOptions' => $htmlOptions, 'content' => $emailMessageContent->{$attribute}, 'paragraphy' => "false", 'fullpage' => "true", 'observeImages' => 'true', 'deniedTags' => CJSON::encode($this->resolveDeniedTags()), 'initCallback' => 'function(){
var contentHeight = $(".redactor_box iframe").contents().find("body").outerHeight();
$(".redactor_box iframe").height(contentHeight + 50);
}', 'plugins' => CJSON::encode(array('fontfamily', 'fontsize', 'fontcolor', 'imagegallery'))));
// End Not Coding Standard
$cClipWidget->endClip();
$content = $cClipWidget->getController()->clips['Redactor'];
return $content;
}
示例5: renderCustomThemeColorChooser
protected function renderCustomThemeColorChooser()
{
$attribute = 'customThemeColor1';
$inputId = $this->getEditableInputId($attribute);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip($attribute);
// Begin Not Coding Standard
$cClipWidget->widget('application.core.widgets.ZurmoColorPicker', array('inputName' => $this->getEditableInputName($attribute), 'inputId' => $this->getEditableInputId($attribute), 'inputValue' => $this->model->{$attribute}, 'htmlOptions' => array('class' => 'color-picker'), 'change' => "function(event, ui) {\n \$('#{$inputId}').css('border-color', ui.color.toString());\n \$('div.custom .theme-color-1').css('background-color', ui.color.toString());\n }"));
// End Not Coding Standard
$cClipWidget->endClip();
$content = ZurmoHtml::tag('div', array(), $cClipWidget->getController()->clips[$attribute]);
$attribute = 'customThemeColor2';
$inputId = $this->getEditableInputId($attribute);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip($attribute);
// Begin Not Coding Standard
$cClipWidget->widget('application.core.widgets.ZurmoColorPicker', array('inputName' => $this->getEditableInputName($attribute), 'inputId' => $inputId, 'inputValue' => $this->model->{$attribute}, 'htmlOptions' => array('class' => 'color-picker'), 'change' => "function(event, ui) {\n \$('#{$inputId}').css('border-color', ui.color.toString());\n \$('div.custom .theme-color-2').css('background-color', ui.color.toString());\n }"));
// End Not Coding Standard
$cClipWidget->endClip();
$content .= ZurmoHtml::tag('div', array(), $cClipWidget->getController()->clips[$attribute]);
$attribute = 'customThemeColor3';
$inputId = $this->getEditableInputId($attribute);
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip($attribute);
// Begin Not Coding Standard
$cClipWidget->widget('application.core.widgets.ZurmoColorPicker', array('inputName' => $this->getEditableInputName($attribute), 'inputId' => $this->getEditableInputId($attribute), 'inputValue' => $this->model->{$attribute}, 'htmlOptions' => array('class' => 'color-picker'), 'change' => "function(event, ui) {\n \$('#{$inputId}').css('border-color', ui.color.toString());\n \$('div.custom .theme-color-3').css('background-color', ui.color.toString());\n }"));
// End Not Coding Standard
$cClipWidget->endClip();
$content .= ZurmoHtml::tag('div', array(), $cClipWidget->getController()->clips[$attribute]);
return ZurmoHtml::tag('div', array('id' => 'customThemeColorPicker', 'class' => 'clearfix'), $content);
}
示例6: renderContent
public function renderContent()
{
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("OrgChart");
$cClipWidget->widget('application.core.widgets.OrgChart');
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['OrgChart'];
}
示例7: renderContent
public function renderContent()
{
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("RssReader");
$cClipWidget->widget('application.core.widgets.RssReader', array('id' => $this->uniqueLayoutId, 'url' => $this->resolveViewAndMetadataValueByName('url'), 'limit' => 3));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['RssReader'];
}
示例8: renderProgressBarContent
protected function renderProgressBarContent()
{
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("ProgressBar");
$cClipWidget->widget('zii.widgets.jui.CJuiProgressBar', array('id' => $this->getProgressBarId(), 'value' => 0));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['ProgressBar'];
}
示例9: render
public function render()
{
$menuItems = $this->renderMenuItem();
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("ActionMenu");
$cClipWidget->widget('application.core.widgets.MbMenu', array('items' => array($menuItems)));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['ActionMenu'];
}
示例10: renderSearchScopingInputContent
protected function renderSearchScopingInputContent()
{
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("ScopedJuiMultiSelect");
$cClipWidget->widget('ext.zurmoinc.framework.widgets.ScopedSearchJuiMultiSelect', array('dataAndLabels' => $this->model->getGlobalSearchAttributeNamesAndLabelsAndAll(), 'selectedValue' => $this->selectedValue, 'inputId' => $this->getEditableInputId(SearchForm::ANY_MIXED_ATTRIBUTES_SCOPE_NAME), 'inputName' => $this->getEditableInputName(SearchForm::ANY_MIXED_ATTRIBUTES_SCOPE_NAME), 'options' => array('selectedText' => '', 'noneSelectedText' => '', 'header' => false), 'htmlOptions' => array('class' => 'ignore-style ignore-clearform')));
$cClipWidget->endClip();
$content = $cClipWidget->getController()->clips['ScopedJuiMultiSelect'];
return $content;
}
示例11: render
public function render()
{
$menuItems = $this->renderMenuItem();
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("ActionMenu");
$cClipWidget->widget('application.core.widgets.DividedMenu', array('items' => array($menuItems), 'htmlOptions' => $this->resolveHtmlOptionsForRendering()));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['ActionMenu'];
}
示例12: renderContent
protected function renderContent()
{
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("Breadcrumbs");
$cClipWidget->widget('zii.widgets.CBreadcrumbs', array('homeLink' => ZurmoHtml::link($this->getHomeLinkLabel(), $this->getHomeUrl()), 'links' => $this->breadcrumbLinks, 'separator' => ' / '));
$cClipWidget->endClip();
$content = $cClipWidget->getController()->clips['Breadcrumbs'];
return $content;
}
示例13: renderImagesUploadInput
protected function renderImagesUploadInput()
{
$inputNameAndId = 'file';
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("imageFilesElement");
$cClipWidget->widget('application.core.widgets.ImageFileUpload', array('uploadUrl' => Yii::app()->createUrl("zurmo/imageModel/upload"), 'deleteUrl' => Yii::app()->createUrl("zurmo/imageModel/delete"), 'inputName' => $inputNameAndId, 'inputId' => $inputNameAndId, 'hiddenInputName' => 'filesIds', 'allowMultipleUpload' => true, 'existingFiles' => array(), 'maxSize' => (int) InstallUtil::getMaxAllowedFileSize(), 'showMaxSize' => true, 'id' => __CLASS__, 'onSuccessAction' => "\$('#{$this->listViewGridId}').yiiGridView('update');", 'formData' => "{'" . Yii::app()->request->csrfTokenName . "' : '" . Yii::app()->request->csrfToken . "'}"));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['imageFilesElement'];
}
示例14: getSortableListContent
/**
* @param array $items
* @return string
*/
protected function getSortableListContent(array $items)
{
//unless we refactor getTreeType to getComponentType... but that requires a bigger refactor
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip('WorkflowOrderSortable');
$cClipWidget->widget('application.core.widgets.JuiSortable', array('items' => $items, 'itemTemplate' => '<li>content</li>', 'htmlOptions' => array('id' => 'workflowRowsUl', 'class' => 'sortable'), 'options' => array('cancel' => 'li.expanded-row', 'placeholder' => 'ui-state-highlight', 'containment' => 'parent'), 'showEmptyList' => false));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['WorkflowOrderSortable'];
}
示例15: render
public function render()
{
$items = array($this->renderMenuItem());
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("MarketingListDetailsMenu");
$cClipWidget->widget('application.core.widgets.MinimalDynamicLabelMbMenu', array('htmlOptions' => array('id' => 'ListViewDetailsActionMenu'), 'items' => $items));
$cClipWidget->endClip();
return $cClipWidget->getController()->clips['MarketingListDetailsMenu'];
}