本文整理匯總了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);
}