本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}