Elgg
Version 2.3
|
WARNING: API IN FLUX. More...
Public Member Functions | |
__construct (PluginHooksService $hooks, Logger $logger) | |
Constructor. More... | |
canonicalizeViewName ($alias) | |
Takes a view name and returns the canonical name for that view. More... | |
autoregisterViews ($view_base, $folder, $viewtype) | |
private More... | |
findViewFile ($view, $viewtype) | |
Find the view file. More... | |
setViewDir ($view, $location, $viewtype= '') | |
registerViewtypeFallback ($viewtype) | |
private More... | |
doesViewtypeFallback ($viewtype) | |
private More... | |
renderDeprecatedView ($view, array $vars, $suggestion, $version) | |
Display a view with a deprecation notice. More... | |
getViewList ($view) | |
Get the views, including extensions, used to render a view. More... | |
renderView ($view, array $vars=[], $ignored=false, $viewtype= '', $issue_missing_notice=true) | |
private More... | |
viewExists ($view, $viewtype= '', $recurse=true) | |
private More... | |
extendView ($view, $view_extension, $priority=501) | |
private More... | |
viewIsExtended ($view) | |
Is the given view extended? More... | |
viewHasHookHandlers ($view) | |
Do hook handlers exist to modify the view? More... | |
unextendView ($view, $view_extension) | |
private More... | |
registerCacheableView ($view) | |
private More... | |
isCacheableView ($view) | |
private More... | |
registerPluginViews ($path, &$failed_dir= '') | |
Register a plugin's views. More... | |
mergeViewsSpec (array $spec) | |
Merge a specification of absolute view paths. More... | |
listViews ($viewtype= 'default') | |
List all views in a viewtype. More... | |
getInspectorData () | |
Get inspector data. More... | |
configureFromCache (SystemCache $cache) | |
Configure locations from the cache. More... | |
cacheConfiguration (SystemCache $cache) | |
Cache the configuration. More... | |
Public Attributes | |
const | VIEW_HOOK = 'view' |
const | VIEW_VARS_HOOK = 'view_vars' |
const | OUTPUT_KEY = '__view_output' |
$view_path | |
Protected Member Functions | |
fileExists ($path) | |
Wrapper for file_exists() that caches false results (the stat cache only caches true results). More... | |
Protected Attributes | |
$file_exists_cache = [] | |
WARNING: API IN FLUX.
DO NOT USE DIRECTLY.
Use the elgg_* versions instead.
private
Definition at line 17 of file ViewsService.php.
Elgg\ViewsService::__construct | ( | PluginHooksService | $hooks, |
Logger | $logger | ||
) |
Constructor.
PluginHooksService | $hooks | The hooks service |
Logger | $logger | Logger |
Definition at line 88 of file ViewsService.php.
Elgg\ViewsService::autoregisterViews | ( | $view_base, | |
$folder, | |||
$viewtype | |||
) |
private
Definition at line 128 of file ViewsService.php.
Elgg\ViewsService::cacheConfiguration | ( | SystemCache | $cache | ) |
Cache the configuration.
SystemCache | $cache | The system cache |
Definition at line 674 of file ViewsService.php.
Elgg\ViewsService::canonicalizeViewName | ( | $alias | ) |
Takes a view name and returns the canonical name for that view.
string | $alias | The possibly non-canonical view name. |
Definition at line 100 of file ViewsService.php.
Elgg\ViewsService::configureFromCache | ( | SystemCache | $cache | ) |
Configure locations from the cache.
SystemCache | $cache | The system cache |
Definition at line 651 of file ViewsService.php.
Elgg\ViewsService::doesViewtypeFallback | ( | $viewtype | ) |
private
Definition at line 217 of file ViewsService.php.
Elgg\ViewsService::extendView | ( | $view, | |
$view_extension, | |||
$priority = 501 |
|||
) |
private
Definition at line 422 of file ViewsService.php.
|
protected |
Wrapper for file_exists() that caches false results (the stat cache only caches true results).
This saves us from many unneeded file stat calls when a common view uses a fallback.
string | $path | Path to the file |
Definition at line 340 of file ViewsService.php.
Elgg\ViewsService::findViewFile | ( | $view, | |
$viewtype | |||
) |
Find the view file.
string | $view | View name |
string | $viewtype | Viewtype |
Definition at line 171 of file ViewsService.php.
Elgg\ViewsService::getInspectorData | ( | ) |
Elgg\ViewsService::getViewList | ( | $view | ) |
Get the views, including extensions, used to render a view.
Keys returned are view priorities. View existence is not checked.
string | $view | View name |
Definition at line 253 of file ViewsService.php.
Elgg\ViewsService::isCacheableView | ( | $view | ) |
private
Definition at line 498 of file ViewsService.php.
Elgg\ViewsService::listViews | ( | $viewtype = 'default' | ) |
List all views in a viewtype.
string | $viewtype | Viewtype |
private
Definition at line 612 of file ViewsService.php.
Elgg\ViewsService::mergeViewsSpec | ( | array | $spec | ) |
Merge a specification of absolute view paths.
array | $spec | Specification viewtype => [ view_name => path or array of paths ] |
private
Definition at line 577 of file ViewsService.php.
Elgg\ViewsService::registerCacheableView | ( | $view | ) |
private
Definition at line 489 of file ViewsService.php.
Elgg\ViewsService::registerPluginViews | ( | $path, | |
& | $failed_dir = '' |
||
) |
Register a plugin's views.
string | $path | Base path of the plugin |
string | $failed_dir | This var is set to the failed directory if registration fails |
private
Definition at line 535 of file ViewsService.php.
Elgg\ViewsService::registerViewtypeFallback | ( | $viewtype | ) |
private
Definition at line 210 of file ViewsService.php.
Elgg\ViewsService::renderDeprecatedView | ( | $view, | |
array | $vars, | ||
$suggestion, | |||
$version | |||
) |
Display a view with a deprecation notice.
No missing view NOTICE is logged
string | $view | The name and location of the view to use |
array | $vars | Variables to pass to the view |
string | $suggestion | Suggestion with the deprecation message |
string | $version | Human-readable release version: 1.7, 1.8, ... |
Definition at line 234 of file ViewsService.php.
Elgg\ViewsService::renderView | ( | $view, | |
array | $vars = [] , |
||
$ignored = false , |
|||
$viewtype = '' , |
|||
$issue_missing_notice = true |
|||
) |
private
Definition at line 264 of file ViewsService.php.
Elgg\ViewsService::setViewDir | ( | $view, | |
$location, | |||
$viewtype = '' |
|||
) |
string | $view | Name of the view |
string | $location | Full path to the view file |
string | $viewtype | The viewtype to register this under |
private
Definition at line 191 of file ViewsService.php.
Elgg\ViewsService::unextendView | ( | $view, | |
$view_extension | |||
) |
private
Definition at line 468 of file ViewsService.php.
Elgg\ViewsService::viewExists | ( | $view, | |
$viewtype = '' , |
|||
$recurse = true |
|||
) |
private
Definition at line 381 of file ViewsService.php.
Elgg\ViewsService::viewHasHookHandlers | ( | $view | ) |
Do hook handlers exist to modify the view?
string | $view | View name |
Definition at line 461 of file ViewsService.php.
Elgg\ViewsService::viewIsExtended | ( | $view | ) |
Is the given view extended?
string | $view | View name |
Definition at line 448 of file ViewsService.php.
|
protected |
Definition at line 27 of file ViewsService.php.
Elgg\ViewsService::$view_path |
Definition at line 80 of file ViewsService.php.
const Elgg\ViewsService::OUTPUT_KEY = '__view_output' |
Definition at line 21 of file ViewsService.php.
const Elgg\ViewsService::VIEW_HOOK = 'view' |
Definition at line 19 of file ViewsService.php.
const Elgg\ViewsService::VIEW_VARS_HOOK = 'view_vars' |
Definition at line 20 of file ViewsService.php.