42 return array_keys(
$CONFIG->views->locations);
56 if (
$CONFIG->system_cache_enabled) {
59 $overrides = unserialize(
$data);
68 $location =
"{$CONFIG->viewpath}{$viewtype}/";
72 foreach ($core_file_list as
$path) {
74 $views[$component->view] = array(500 => $component);
80 $component->view =
$view;
81 $component->location =
"{$location}{$viewtype}/";
82 $views[
$view] = array(500 => $component);
89 if (isset($views[$ext_view])) {
90 $view_list[
$priority] = $views[$ext_view][500];
93 if (count($view_list) > 0) {
94 $views[
$view] = $view_list;
101 foreach ($views as
$view => $view_list) {
103 $overrides_list = array();
106 $component->overridden =
true;
107 $component->view =
$view;
108 $component->location =
"{$location}{$viewtype}/";
109 $overrides_list[
"o:$i"] = $component;
111 $views[
$view] = $overrides_list + $view_list;
119 $filtered_views = array();
120 if (!empty($handlers[
'view'])) {
121 $filtered_views = array_keys($handlers[
'view']);
124 $global_hooks = array();
125 if (!empty($handlers[
'view'][
'all'])) {
126 $global_hooks[] =
'view,all';
128 if (!empty($handlers[
'display'][
'view'])) {
129 $global_hooks[] =
'display,view';
131 if (!empty($handlers[
'display'][
'all'])) {
132 $global_hooks[] =
'display,all';
137 'global_hooks' => $global_hooks,
138 'filtered_views' => $filtered_views,
150 $tree[
$handler] = array($handler_obj->name, implode(
',', array_values($handler_obj->context)));
169 'public' =>
'public',
170 'logged_in' =>
'logged in only',
171 'admin' =>
'admin only',
175 $info[
'file'] = substr($info[
'file'], $start);
191 foreach (
$CONFIG->views->simplecache as
$view => $foo) {
209 foreach ($API_METHODS as
$method => $info) {
210 $params = implode(
', ', array_keys($info[
'parameters']));
217 $info[
'call_method'],
218 ($info[
'require_api_auth']) ?
'API authentication required' :
'No API authentication required',
219 ($info[
'require_user_auth']) ?
'User authentication required' :
'No user authentication required',
239 $jit_menus = array(
'annotation',
'entity',
'login',
'longtext',
'owner_block',
'user_hover',
'widget');
250 $entity->title =
'test entity';
253 $user = new \ElggUser();
255 $user->name =
"Test User";
256 $user->username =
'test_user';
260 $widget->title =
'test widget';
263 foreach ($jit_menus as
$type) {
287 $text = htmlspecialchars(
$item->getText(), ENT_QUOTES,
'UTF-8',
false);
288 $href =
$item->getHref();
289 if ($href ===
false) {
290 $href =
'not a link';
291 } elseif ($href ===
"") {
292 $href =
'not a direct link - possibly ajax';
294 $section =
$item->getSection();
295 $parent =
$item->getParentName();
300 $tree[$menu_name][
$name] = array(
324 if (is_string($callable)) {
327 if (is_array($callable) && array_keys($callable) === array(0, 1) && is_string($callable[1])) {
328 if (is_string($callable[0])) {
329 return "{$callable[0]}::{$callable[1]}";
331 return "(" . get_class($callable[0]) .
")->{$callable[1]}";
333 if ($callable instanceof \Closure) {
334 $ref = new \ReflectionFunction($callable);
335 $file = $ref->getFileName();
336 $line = $ref->getStartLine();
338 if ($file_root && 0 === strpos($file, $file_root)) {
339 $file = substr($file, strlen($file_root));
342 return "(Closure {$file}:{$line})";
344 if (is_object($callable)) {
345 return "(" . get_class($callable) .
")->__invoke()";
361 foreach ($all_handlers as $hook => $types) {
362 foreach ($types as
$type => $handlers) {
363 array_walk($handlers,
function (&$callable,
$priority) use ($root) {
365 $callable =
"$priority: $description";
367 $tree[$hook .
',' .
$type] = $handlers;
383 $view_list = array();
385 $handle = opendir($dir);
386 while ($file = readdir($handle)) {
387 if ($file[0] ==
'.') {
389 }
else if (is_dir($dir . $file)) {
390 $view_list = array_merge($view_list, $this->
recurseFileTree($dir . $file .
"/"));
394 $view_list[] = $dir . $file;
if($guid==elgg_get_logged_in_user_guid()) $name
static fromPaths($path, $location)
Get a component from the path and location.
getPluginHooks()
Get Elgg plugin hooks information.
getMenus()
Get information about registered menus.
buildHandlerTree($all_handlers)
Build a tree of event handlers.
getViews($viewtype='default')
Get Elgg view information.
describeCallable($callable, $file_root='')
Get a string description of a callback.
getViewtypes()
Get all view types for known views.
recurseFileTree($dir)
Create array of all php files in directory and subdirectories.
getWebServices()
Get Elgg web services API methods.
getEvents()
Get Elgg event information.
getWidgets()
Get Elgg widget information.
getSimpleCache()
Get simplecache information.
getActions()
Get Elgg actions information.
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_get_root_path()
Get the root directory path for this installation.
$annotation
Elgg default annotation view.
events($event="", $object_type="", $function="", $priority=500, $call=false, $object=null)
Deprecated events core function.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
if($screenshots) $description