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


PHP Field::setFromPOST方法代码示例

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


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

示例1: setFromPOST

 public function setFromPOST(array $settings = array())
 {
     parent::setFromPOST($settings);
     if ($this->get('validator') == '') {
         $this->remove('validator');
     }
 }
开发者ID:rc1,项目名称:WebAppsWithCmsStartHere,代码行数:7,代码来源:field.input.php

示例2: setFromPOST

 public function setFromPOST($postdata)
 {
     parent::setFromPOST($postdata);
     if ($this->get('validator') == '') {
         $this->remove('validator');
     }
 }
开发者ID:rainerborene,项目名称:symphony-2,代码行数:7,代码来源:field.input.php

示例3: setFromPOST

 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array &$settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // set new settings
     $new_settings['sections'] = is_array($settings['sections']) ? implode(self::SEPARATOR, $settings['sections']) : (is_string($settings['sections']) ? $settings['sections'] : null);
     $new_settings['show_association'] = $settings['show_association'] == 'yes' ? 'yes' : 'no';
     $new_settings['deepness'] = General::intval($settings['deepness']);
     $new_settings['deepness'] = $new_settings['deepness'] < 1 ? null : $new_settings['deepness'];
     $new_settings['elements'] = empty($settings['elements']) ? null : $settings['elements'];
     $new_settings['mode'] = empty($settings['mode']) ? null : $settings['mode'];
     $new_settings['allow_new'] = $settings['allow_new'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_edit'] = $settings['allow_edit'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_link'] = $settings['allow_link'] == 'yes' ? 'yes' : 'no';
     $new_settings['allow_delete'] = $settings['allow_delete'] == 'yes' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:26,代码来源:field.entry_relationship.php

示例4: setFromPOST

 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array $settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // always display in table mode
     $new_settings['show_column'] = 'yes';
     // set new settings
     $new_settings['field-classes'] = $settings['field-handles'];
     //var_dump(isset($settings['table-width']));die;
     $new_settings['table-width'] = isset($settings['table-width']) ? $settings['table-width'] : NULL;
     $new_settings['table-height'] = isset($settings['table-height']) ? $settings['table-height'] : NULL;
     $new_settings['table-resize'] = isset($settings['table-resize']) ? $settings['table-resize'] : NULL;
     $new_settings['table-position'] = isset($settings['table-position']) ? $settings['table-position'] : NULL;
     $new_settings['table-absolute'] = isset($settings['table-absolute']) && $settings['table-absolute'] == 'on' ? 'yes' : 'no';
     $new_settings['entry-width'] = isset($settings['entry-width']) ? $settings['entry-width'] : NULL;
     $new_settings['entry-height'] = isset($settings['entry-height']) ? $settings['entry-height'] : NULL;
     $new_settings['entry-resize'] = isset($settings['entry-resize']) ? $settings['entry-resize'] : NULL;
     $new_settings['entry-position'] = isset($settings['entry-position']) ? $settings['entry-position'] : NULL;
     $new_settings['entry-absolute'] = isset($settings['entry-absolute']) && $settings['entry-absolute'] == 'on' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }
开发者ID:rc1,项目名称:WebAppsWithCmsStartHere,代码行数:30,代码来源:field.image_preview_settings.php

示例5: setFromPOST

 /**
  * This function permits parsing different field settings values
  *
  * @param array $settings
  *	the data array to initialize if necessary.
  */
 public function setFromPOST(array $settings = array())
 {
     // call the default behavior
     parent::setFromPOST($settings);
     // declare a new setting array
     $new_settings = array();
     // set new settings
     $new_settings['unique'] = isset($settings['unique']) && $settings['unique'] == 'on' ? 'yes' : 'no';
     $new_settings['thumbs'] = isset($settings['thumbs']) && $settings['thumbs'] == 'on' ? 'yes' : 'no';
     $new_settings['driver'] = isset($settings['driver']) && is_array($settings['driver']) ? implode(',', $settings['driver']) : null;
     $new_settings['query_params'] = isset($settings['query_params']) && !!$settings['query_params'] ? $settings['query_params'] : null;
     $new_settings['force_ssl'] = isset($settings['force_ssl']) && $settings['force_ssl'] == 'on' ? 'yes' : 'no';
     $new_settings['unique_media'] = isset($settings['unique_media']) && $settings['unique_media'] == 'on' ? 'yes' : 'no';
     // save it into the array
     $this->setArray($new_settings);
 }
开发者ID:justinjaywang,项目名称:oembed_field,代码行数:22,代码来源:field.oembed.php


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