44 throw new \InvalidParameterException(
'Id missing for WidgetDefinition');
72 $definition->name =
elgg_echo(
"widgets:{$id}:name");
76 $definition->name =
$id;
79 $definition->name =
$name;
85 $definition->description =
elgg_echo(
"widgets:{$id}:description");
91 $definition->context = (array)
elgg_extract(
'context', $options, [
'all']);
92 $definition->multiple = (bool)
elgg_extract(
'multiple', $options,
false);
105 if (
$name ===
'handler') {
elgg_language_key_exists($key, $language= 'en')
Check if a given language key exists.
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
if($categories) $description
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
if(!$collection_name) $id