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


PHP FieldManager::saveSettings方法代码示例

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


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

示例1: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     fieldMemberUsername::createSettingsTable();
     $fields = array('field_id' => $id, 'validator' => $this->get('validator'));
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:andrewminton,项目名称:members,代码行数:13,代码来源:field.memberusername.php

示例2: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     $fields['field_id'] = $id;
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:henrysingleton,项目名称:publish_tabs,代码行数:13,代码来源:field.publish_tabs.php

示例3: commit

 /**
  * Persist field configuration
  */
 function commit()
 {
     // set up standard Field settings
     if (!parent::commit()) {
         return FALSE;
     }
     $id = $this->get('id');
     if ($id === FALSE) {
         return FALSE;
     }
     $fields = array();
     $fields['field_id'] = $id;
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:symphonists,项目名称:search_index,代码行数:17,代码来源:field.search_index.php

示例4: commit

 public function commit()
 {
     if (!Field::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     $fields['field_id'] = $id;
     $fields['pre_populate'] = $this->get('pre_populate') ? $this->get('pre_populate') : 'no';
     $fields['mode'] = $this->get('mode') ? $this->get('mode') : 'normal';
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:symphonists,项目名称:datemodified,代码行数:15,代码来源:field.datemodified.php

示例5: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $state = $this->get('default_state');
     $entries = (int) $this->get('unique_entries');
     $steal = $this->get('unique_steal');
     $fields = array('field_id' => $id, 'default_state' => $state ? $state : 'off', 'unique_entries' => $entries > 0 ? $entries : 1, 'unique_steal' => $steal ? $steal : 'off');
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:symphonists,项目名称:uniquecheckboxfield,代码行数:15,代码来源:field.uniquecheckbox.php

示例6: commit

 /**
  * Save the settings panel
  *
  * @return bool
  */
 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     if ($this->get('related_field_id') != '') {
         $settings['related_field_id'] = $this->get('related_field_id');
     }
     $settings['allow_multiple_selection'] = $this->get('allow_multiple_selection') ? $this->get('allow_multiple_selection') : 'no';
     $settings['show_association'] = $this->get('show_association') == 'yes' ? 'yes' : 'no';
     $settings['limit'] = max(1, (int) $this->get('limit'));
     $settings['related_field_id'] = implode(',', $this->get('related_field_id'));
     $settings['view'] = $this->get('view');
     $settings['show_created'] = $this->get('show_created') == 'yes' ? 1 : 0;
     $settings['enable_create'] = $this->get('enable_create') == 'yes' ? 1 : 0;
     $settings['enable_edit'] = $this->get('enable_edit') == 'yes' ? 1 : 0;
     $settings['enable_delete'] = $this->get('enable_delete') == 'yes' ? 1 : 0;
     FieldManager::saveSettings($id, $settings);
     SectionManager::removeSectionAssociation($id);
     foreach ($this->get('related_field_id') as $field_id) {
         SectionManager::createSectionAssociation(null, $id, $field_id, $this->get('show_association') == 'yes' ? true : false);
     }
     return true;
 }
开发者ID:korelogicDave,项目名称:selectbox_link_field_image,代码行数:33,代码来源:field.selectbox_link_image.php

示例7: commit

 public function commit()
 {
     if (!parent::commit()) {
         return FALSE;
     }
     $id = $this->get('id');
     if ($id === FALSE) {
         return FALSE;
     }
     $fields = array();
     $fields['field_id'] = $id;
     $fields['note'] = $this->get('note');
     $fields['editable'] = $this->get('editable') ? 1 : 0;
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:15,代码来源:field.publishnotes.php

示例8: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     fieldMemberPassword::createSettingsTable();
     $this->rememberSalt();
     $fields = array('field_id' => $id, 'length' => $this->get('length'), 'strength' => $this->get('strength'), 'code_expiry' => $this->get('code_expiry'));
     if ($this->get('salt')) {
         $fields['salt'] = $this->get('salt');
     }
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:andrewminton,项目名称:members,代码行数:17,代码来源:field.memberpassword.php

示例9: commit

 public function commit()
 {
     if (!Field::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     fieldMemberActivation::createSettingsTable();
     $fields = array('field_id' => $id, 'code_expiry' => $this->get('code_expiry'), 'activation_role_id' => $this->get('activation_role_id'), 'deny_login' => $this->get('deny_login') == 'yes' ? 'yes' : 'no');
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:andrewminton,项目名称:members,代码行数:13,代码来源:field.memberactivation.php

示例10: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     $fields['field_id'] = $id;
     $fields['expression'] = trim($this->get('expression'));
     $fields['show_errors'] = $this->get('show_errors') == 'yes' ? 'yes' : 'no';
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:ahwayakchih,项目名称:conditionalizer,代码行数:15,代码来源:field.conditionalizer.php

示例11: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array('validator' => null);
     $fields['validator'] = $fields['validator'] == 'custom' ? null : $this->get('validator');
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:rc1,项目名称:WebAppsWithCmsStartHere,代码行数:13,代码来源:field.input.php

示例12: commit

 /**
  *
  * Save field settings into the field's table
  */
 public function commit()
 {
     // if the default implementation works...
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     // exit if there is no id
     if ($id == false) {
         return false;
     }
     // we are the child, with multiple parents
     $child_field_id = $id;
     // delete associations, only where we are the child
     self::removeSectionAssociation($child_field_id);
     $sections = $this->getSelectedSectionsArray();
     foreach ($sections as $key => $sectionId) {
         if (empty($sectionId)) {
             continue;
         }
         $parent_section_id = General::intval($sectionId);
         $parent_section = SectionManager::fetch($sectionId);
         $fields = $parent_section->fetchVisibleColumns();
         if (empty($fields)) {
             // no visible field, revert to all
             $fields = $parent_section->fetchFields();
         }
         $parent_field_id = current(array_keys($fields));
         // create association
         SectionManager::createSectionAssociation($parent_section_id, $child_field_id, $parent_field_id, $this->get('show_association') == 'yes');
     }
     // declare an array contains the field's settings
     $settings = array('sections' => $this->get('sections'), 'show_association' => $this->get('show_association'), 'deepness' => $this->get('deepness'), 'elements' => $this->get('elements'), 'mode' => $this->get('mode'), 'min_entries' => $this->get('min_entries'), 'max_entries' => $this->get('max_entries'), 'allow_new' => $this->get('allow_new'), 'allow_edit' => $this->get('allow_edit'), 'allow_link' => $this->get('allow_link'), 'allow_delete' => $this->get('allow_delete'));
     return FieldManager::saveSettings($id, $settings);
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:39,代码来源:field.entry_relationship.php

示例13: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     $fields['link'] = $this->get('link');
     $fields['hours'] = $this->get('hours');
     $fields['auto_delete'] = $this->get('auto_delete') == 'yes' ? 1 : 0;
     FieldManager::saveSettings($id, $fields);
 }
开发者ID:andrewminton,项目名称:field_unique_link,代码行数:15,代码来源:field.unique_link.php

示例14: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     $fields['default_state'] = $this->get('default_state') ? $this->get('default_state') : 'off';
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:readona,项目名称:symphonyno5,代码行数:13,代码来源:field.checkbox.php

示例15: commit

 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     $fields = array();
     if ($this->get('formatter') != 'none') {
         $fields['formatter'] = $this->get('formatter');
     }
     $fields['size'] = $this->get('size');
     return FieldManager::saveSettings($id, $fields);
 }
开发者ID:davjand,项目名称:codecept-symphonycms-db,代码行数:16,代码来源:field.textarea.php


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