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


PHP EE_Fieldtype::settings_modify_column方法代码示例

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


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

示例1: array

	/**
	 * Modify exp_channel_data Column Settings
	 */
	function settings_modify_column($data)
	{
		if ($data['ee_action'] == 'delete')
		{
			// -------------------------------------------
			//  Delete the field data
			// -------------------------------------------

			$rows = $this->EE->db->select('row_id')
			                     ->where('field_id', $data['field_id'])
			                     ->get('matrix_data');

			if ($rows->num_rows())
			{
				$delete_rows = array();

				foreach ($rows->result() as $row)
				{
					$delete_rows[] = $row->row_id;
				}

				$this->_delete_rows($delete_rows);
			}

			// -------------------------------------------
			//  Delete the columns
			// -------------------------------------------

			// decode the field settings
			$settings = unserialize(base64_decode($data['field_settings']));

			if (isset($settings['col_ids']) && $settings['col_ids'])
			{
				$this->_delete_cols($settings['col_ids']);
			}

		}

		// just return the default column settings
		return parent::settings_modify_column($data);
	}
开发者ID:rmdort,项目名称:adiee,代码行数:44,代码来源:ft.matrix.php

示例2:

 /**
  * Modify exp_channel_data Column Settings
  */
 function settings_modify_column($data)
 {
     if ($data['ee_action'] == 'delete') {
         // delete any relationships created by this field
         $this->EE->db->where('parent_field_id', $data['field_id'])->delete('playa_relationships');
     }
     // just return the default column settings
     return parent::settings_modify_column($data);
 }
开发者ID:realfluid,项目名称:umbaugh,代码行数:12,代码来源:ft.playa.php

示例3:

 /**
  * Modify exp_channel_data Column Settings
  */
 function settings_modify_column($data)
 {
     if ($data['ee_action'] == 'delete') {
         $this->_delete_field(array('field_id' => $data['field_id']));
     }
     // just return the default column settings
     return parent::settings_modify_column($data);
 }
开发者ID:jamesmar38,项目名称:p4bhealth,代码行数:11,代码来源:ft.matrix.php

示例4: foreach

 /**
  * Modify exp_channel_data Column Settings
  */
 function settings_modify_column($data)
 {
     // is this a new Assets field?
     if ($data['ee_action'] == 'add') {
         $field_id = $data['field_id'];
         $field_name = 'field_id_' . $field_id;
         // is this an existing field?
         if ($this->EE->db->field_exists($field_name, 'channel_data')) {
             $entries = $this->EE->db->select("entry_id, {$field_name}")->where("{$field_name} LIKE '{filedir_%'")->where("{$field_name} != ", '')->get('channel_data');
             foreach ($entries->result() as $entry) {
                 $this->_migrate_field_data($entry->{$field_name}, array('entry_id' => $entry->entry_id, 'field_id' => $field_id));
             }
         }
     } else {
         if ($data['ee_action'] == 'delete') {
             // delete any asset associations created by this field
             $this->EE->db->where('field_id', $data['field_id'])->delete('assets_selections');
         }
     }
     // just return the default column settings
     return parent::settings_modify_column($data);
 }
开发者ID:kentonquatman,项目名称:canyonwoodridge,代码行数:25,代码来源:ft.assets.php


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