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


PHP dmArray::toHtmlCssClasses方法代码示例

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


在下文中一共展示了dmArray::toHtmlCssClasses方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: label

 public function label($label = null, $attributes = array())
 {
     $attributes = dmString::toArray($attributes);
     $attributes['class'] = dmArray::toHtmlCssClasses(empty($attributes['class']) ? array('label') : array_merge((array) $attributes['class'], array('label')));
     $label = null === $label ? $this->parent->getWidget()->getLabel($this->name) : $label;
     $this->htmlBuffer .= parent::renderLabel($label, $attributes);
     return $this;
 }
开发者ID:runopencode,项目名称:diem-extended,代码行数:8,代码来源:dmFormField.php

示例2: renderBodyTag

  public function renderBodyTag($options = array())
  {
    $options = dmString::toArray($options);

    $options['class'] = dmArray::toHtmlCssClasses(array_merge(dmArray::get($options, 'class', array()), array(
      'page_'.$this->page->get('module').'_'.$this->page->get('action'),
      $this->page->getPageView()->getLayout()->get('css_class')
    )));
    
    return parent::renderBodyTag($options);
  }
开发者ID:jaimesuez,项目名称:diem,代码行数:11,代码来源:dmFrontLayoutHelper.php

示例3: renderZone

 public function renderZone(array $zone)
 {
     $style = !$zone['width'] || $zone['width'] === '100%' ? '' : ' style="width: ' . $zone['width'] . ';"';
     $html = '<div id="dm_zone_' . $zone['id'] . '" class="' . dmArray::toHtmlCssClasses(array('dm_zone', $zone['css_class'])) . '"' . $style . '>';
     if ($this->user->can('zone_edit')) {
         $html .= '<a class="dm dm_zone_edit" title="' . $this->i18n->__('Edit this zone') . '"></a>';
     }
     $html .= '<div class="dm_widgets">';
     $html .= $this->renderZoneInner($zone);
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:theolymp,项目名称:diem,代码行数:13,代码来源:dmFrontPageEditHelper.php

示例4: renderZone

 public function renderZone(array $zone)
 {
     $style = !$zone['width'] || $zone['width'] === '100%' ? '' : ' style="width: ' . $zone['width'] . ';"';
     $html = '<div id="dm_zone_' . $zone['id'] . '" class="' . dmArray::toHtmlCssClasses(array('dm_zone', 'dm_zone_' . $zone['id'], $zone['css_class'], $this->behaviorsManager->isZoneAttachable() ? 'dm_behaviors_attachable' : '')) . '"' . $style . '>';
     if ($this->user->can('zone_edit')) {
         $html .= '<a class="dm dm_zone_edit' . ($this->user->can('behavior_add') && $this->behaviorsManager->isZoneAttachable() ? ' dm_behaviors_droppable' : '') . '" title="' . $this->i18n->__('Edit this zone') . '"></a>';
     }
     if (($this->user->can('behavior_edit') || $this->user->can('behavior_delete')) && $this->behaviorsManager->isZoneAttachable()) {
         $html .= '<a class="dm dm_edit_behaviors_icon s16_gear s16" title="' . $this->i18n->__('Edit behaviors') . '"></a>';
     }
     $html .= '<div class="dm_widgets">';
     $html .= $this->renderZoneInner($zone);
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:runopencode,项目名称:diem-extended,代码行数:16,代码来源:dmFrontPageEditHelper.php

示例5: renderZone

 public function renderZone(array $zone)
 {
     $style = !$zone['width'] || $zone['width'] === '100%' ? '' : ' style="width: ' . $zone['width'] . ';"';
     $html = '<div class="' . dmArray::toHtmlCssClasses(array('dm_zone', $zone['css_class'])) . '"' . $style . '>';
     $html .= '<div class="dm_widgets">';
     $html .= $this->renderZoneInner($zone);
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:jdart,项目名称:diem,代码行数:10,代码来源:dmFrontPageBaseHelper.php

示例6: openPager

 protected function openPager()
 {
     return $this->helper->open('div', array('class' => dmArray::toHtmlCssClasses(array('pager', $this->getOption('class'), $this->getOption('ajax') ? 'dm_pager_ajax_links' : null)))) . $this->helper->open('ul.clearfix');
 }
开发者ID:theolymp,项目名称:diem,代码行数:4,代码来源:dmFrontPagerView.php

示例7: array

$t->is_deeply(dmArray::firsts(array('alpha'), 2), array('alpha'), 'not enough values');
$array = array('alpha', 'beta', 'gamma', 'delta');
$t->is_deeply(dmArray::firsts($array, 2), array('alpha', 'beta'), 'first values');
$t->diag('get');
$t->is_deeply(dmArray::get('alpha', null, 'test'), 'test', 'first parameter is not an array');
$t->is_deeply(dmArray::get(array('alpha'), 0, 'test'), 'alpha', 'key exists');
$t->is_deeply(dmArray::get(array('alpha'), 1, 'test'), 'test', 'key not exists');
$t->is_deeply(dmArray::get(array(''), 0, 'test', false), '', 'empty value without default if empty');
$t->is_deeply(dmArray::get(array(''), 0, 'test', true), 'test', 'empty value with default if empty');
$t->is_deeply(dmArray::get(array('alpha'), 0, 'test', true), 'alpha', 'key exists with default if empty');
$t->diag('last');
$t->is_deeply(dmArray::last('alpha'), 'alpha', 'first parameter is not an array');
$t->is_deeply(dmArray::last(array()), null, 'empty source array');
$array = array('alpha', 'beta', 'gamma', 'delta');
$t->is_deeply(dmArray::last($array), 'delta', 'last value');
$t->diag('toHtmlCssClasses');
$classes = array('class1', '', ' class2', ' ', '  class3  ');
$cleanClasses = 'class1 class2 class3';
$t->is(dmArray::toHtmlCssClasses($classes), $cleanClasses, 'clean classes : ' . $cleanClasses);
$classes = array('class1');
$cleanClasses = 'class1';
$t->is(dmArray::toHtmlCssClasses($classes), $cleanClasses, 'clean classes : ' . $cleanClasses);
$classes = array('  class1 class2 class3  ');
$cleanClasses = 'class1 class2 class3';
$t->is(dmArray::toHtmlCssClasses($classes), $cleanClasses, 'clean classes : ' . $cleanClasses);
$t->diag('unsetEmpty');
$array = array(1 => '', 2 => 'delta', 3 => '', 'alpha' => 'gamma', 'gamma' => '', 'delta' => '');
$t->is_deeply(dmArray::unsetEmpty($array, array(3, 'gamma')), array('1' => '', '2' => 'delta', 'alpha' => 'gamma', 'delta' => ''), 'check');
$t->diag('valueToKey');
$array = array('alpha', 'beta', 'gamma', 'delta');
$t->is_deeply(dmArray::valueToKey($array), array('alpha' => 'alpha', 'beta' => 'beta', 'gamma' => 'gamma', 'delta' => 'delta'), 'check');
开发者ID:theolymp,项目名称:diem,代码行数:31,代码来源:dmArrayTest.php

示例8: renderSubmitTag

 public function renderSubmitTag($value = 'submit', $attributes = array())
 {
     $attributes = array_merge(array('value' => $value, 'type' => 'submit'), dmString::toArray($attributes));
     $attributes['class'] = dmArray::toHtmlCssClasses(array_merge(dmArray::get($attributes, 'class', array()), array('submit')));
     return sprintf('<input%s />', $this->getWidgetSchema()->attributesToHtml($attributes));
 }
开发者ID:vjousse,项目名称:diem,代码行数:6,代码来源:dmForm.php

示例9: convertAttributesToHtml

 protected function convertAttributesToHtml(array $attributes)
 {
     /*
      * Implode classes
      */
     if (isset($attributes['class'])) {
         $attributes['class'] = dmArray::toHtmlCssClasses($attributes['class']);
     }
     /*
      * Remove non html attributes
      */
     foreach ($this->attributesToRemove as $key) {
         if (array_key_exists($key, $attributes)) {
             unset($attributes[$key]);
         }
     }
     /*
      * Remove empty attributes
      */
     $attributes = dmArray::unsetEmpty($attributes, $this->emptyAttributesToRemove);
     /*
      * Convert attributes array into html string params
      */
     $htmlAttributesString = '';
     foreach ($attributes as $key => $value) {
         if (null !== $value) {
             $htmlAttributesString .= ' ' . $key . '="' . htmlspecialchars((string) $value, ENT_COMPAT, 'UTF-8') . '"';
         }
     }
     return $htmlAttributesString;
 }
开发者ID:theolymp,项目名称:diem,代码行数:31,代码来源:dmHtmlTag.php

示例10: setFcbkcompleteOptions

 public function setFcbkcompleteOptions(array $options)
 {
     $this->setAttribute('class', dmArray::toHtmlCssClasses(array($this->getAttribute('class'), json_encode($options))));
 }
开发者ID:rafix,项目名称:ctaller,代码行数:4,代码来源:sfWidgetFormDmTagsAsString.php

示例11: render

 /**
  * @param  string $name        The element name
  * @param  string $value       The value displayed in this widget
  * @param  array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
  * @param  array  $errors      An array of errors for the field
  *
  * @return string An HTML tag string
  *
  * @see sfWidgetForm
  */
 public function render($name, $value = null, $attributes = array(), $errors = array())
 {
     $attributes['class'] = dmArray::toHtmlCssClasses(array(dmArray::get($attributes, 'class'), 'dm_ckeditor', json_encode($this->getOption('config'))));
     return parent::render($name, $value, $attributes, $errors);
 }
开发者ID:vjousse,项目名称:dmCkEditorPlugin,代码行数:15,代码来源:sfWidgetFormTextareaDmCkEditor.php


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