本文整理匯總了PHP中Parameter::get_parameter_id_by_data_entity_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP Parameter::get_parameter_id_by_data_entity_id方法的具體用法?PHP Parameter::get_parameter_id_by_data_entity_id怎麽用?PHP Parameter::get_parameter_id_by_data_entity_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Parameter
的用法示例。
在下文中一共展示了Parameter::get_parameter_id_by_data_entity_id方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: edit_parameter_item
public static function edit_parameter_item($item_id)
{
if (is_numeric($item_id)) {
$data_entity_id = DataEntity::get_entry_by_item_id($item_id);
$parameter_id = Parameter::get_parameter_id_by_data_entity_id($data_entity_id);
$parameter = Parameter::get_instance($parameter_id);
if ($parameter->is_read_access()) {
self::detail($parameter, http_build_query(Retrace::resolve_retrace_string($_GET['retrace'])), false);
}
} else {
throw new ItemIDMissingException();
}
}
示例2: listen_events
/**
* @see EventListenerInterface::listen_events()
* @param object $event_object
* @return bool
*/
public static function listen_events($event_object)
{
if ($event_object instanceof ItemUnlinkEvent) {
if (($data_entity_id = DataEntityIsItem_Access::get_entry_by_item_id($event_object->get_item_id())) != null) {
if (($file_id = File::get_file_id_by_data_entity_id($data_entity_id)) != null) {
$file = File::get_instance($file_id);
if ($file->delete() == false) {
return false;
}
}
if (($value_id = Value::get_value_id_by_data_entity_id($data_entity_id)) != null) {
$value = Value::get_instance($value_id);
if ($value->delete() == false) {
return false;
}
}
if (($parameter_id = Parameter::get_parameter_id_by_data_entity_id($data_entity_id)) != null) {
$parameter = Parameter::get_instance($parameter_id);
if ($parameter->delete() == false) {
return false;
}
}
}
}
if ($event_object instanceof UserDeleteEvent) {
if (DataEntity_Access::set_owner_id_on_null($event_object->get_user_id()) == false) {
return true;
}
}
if ($event_object instanceof GroupDeleteEvent) {
if (DataEntity_Access::set_owner_group_id_on_null($event_object->get_group_id()) == false) {
return true;
}
}
return true;
}