本文整理汇总了PHP中ElggObject::clearMetaData方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggObject::clearMetaData方法的具体用法?PHP ElggObject::clearMetaData怎么用?PHP ElggObject::clearMetaData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElggObject
的用法示例。
在下文中一共展示了ElggObject::clearMetaData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clearMetaData
public function clearMetaData($name = '')
{
if (parent::clearMetaData($name)) {
if (is_array($this->meta_cache) && array_key_exists($name, $this->meta_cache)) {
unset($this->meta_cache[$name]);
}
return true;
}
return false;
}
示例2: elseif
$field->metadata_name = $metadata_name;
if (!empty($metadata_label)) {
$field->metadata_label = $metadata_label;
} elseif ($current_field) {
unset($field->metadata_label);
}
if (!empty($metadata_hint)) {
$field->metadata_hint = $metadata_hint;
} elseif ($current_field) {
unset($field->metadata_hint);
}
$field->metadata_type = $metadata_type;
if ($metadata_type == "dropdown" || $metadata_type == "radio" || $metadata_type == "multiselect") {
$field->metadata_options = $new_options;
} elseif ($current_field) {
$field->clearMetaData("metadata_options");
}
if ($type == "profile") {
$field->show_on_register = $show_on_register;
$field->mandatory = $mandatory;
$field->user_editable = $user_editable;
}
$field->admin_only = $admin_only;
$field->output_as_tags = $output_as_tags;
$field->blank_available = $blank_available;
if (empty($current_field)) {
$field->order = $max_fields;
}
if ($field->save()) {
system_message(elgg_echo("profile_manager:actions:new:success"));
} else {