Summary
- File
- Package hierarchy Menu\links
- Class hierarchy \Menu \LinksMenuElement \LinksMenu
Create a Menu with children.
Children could be Menu or LinksMenuLink objects
Create a Menu with children.
Children could be Menu or LinksMenuLink objects
__construct(string $title, string $url, string $image = '', string $type = self::AUTOMATIC_MENU)
Constructor
string | $title | Menu title |
string | $url | Destination url |
string | $image | Menu's image url relative to the website root or absolute |
string | $type | Menu's type |
None found |
set_image(string $image)
string | $image | the value to set |
None found |
set_url(string $url)
string | $url | the value to set |
None found |
get_uid() : integer
Returns the menu uid
the menu uid
None found |
update_uid()
Update the menu uid
None found |
get_url(boolean $compute_relative_url = true) : string
boolean | $compute_relative_url | If true, computes relative urls to the website root |
the link $url
None found |
get_image(boolean $compute_relative_url = true) : string
boolean | $compute_relative_url | If true, computes relative urls to the website root |
the $image url
None found |
need_cached_string() : boolean
Check if the menu needs to be cached
true if the menu need to be cached
None found |
display(\Template $template = false, $mode = \LinksMenuElement::LINKS_MENU_ELEMENT__CLASSIC_DISPLAYING) : string
Display the menu
\Template | $template | the template to use |
$mode |
the menu parsed in xHTML
None found |
admin_display() : string
Display the menu admin gui
the menu parsed in xHTML
None found |
id(integer $id)
integer | $id | Set the Menu database id |
None found |
check_auth() : boolean
Check the user authorization to see the LinksMenuElement
true if the user is authorised, false otherwise
None found |
set_title( $title)
$title |
None found |
set_auth( $auth)
$auth |
None found |
enabled(boolean $enabled = self::MENU_ENABLED)
boolean | $enabled | Enable or not the Menu |
None found |
set_block( $block) : integer
$block |
the Menu $block position
None found |
set_block_position(integer $position)
integer | $position | the Menu position to set |
None found |
set_hidden_with_small_screens( $value)
$value |
None found |
set_disabled_body( $value)
$value |
None found |
set_pushed_content( $value)
$value |
None found |
set_pushmenu_opening( $value)
$value |
None found |
set_pushmenu_expanding( $value)
$value |
None found |
get_formated_title() : string
the displayable Menu $title
None found |
get_title() : string
the Menu $title
None found |
get_auth() : array
the authorization array $auth
None found |
get_id() : integer
the $id of the menu in the database
None found |
get_block() : integer
the Menu $block position
None found |
get_block_position() : integer
the Menu $position
None found |
is_enabled() : boolean
true if the Menu is enabled, false otherwise
None found |
is_hidden_with_small_screens() : boolean
check if menu is hidden with small screens
None found |
is_disabled_body() : boolean
check if body is disabled (pushmenu)
None found |
is_pushed_content() : boolean
check if body is pushed (pushmenu)
None found |
get_pushmenu_opening() : string
the opening of the pushmenu
None found |
get_pushmenu_expanding() : string
the expanding of the pushmenu
None found |
get_filters() : string
the menu filters
None found |
set_filters(\Array<Filter> $filters)
Sets the filters of the menu
\Array |
$filters | Filters of the menu |
None found |
set_template(\Template $template)
Sets the template of the menu
\Template | $template | Template of the menu |
None found |
add_array(array<mixed,\LinksMenuElement> $menu_elements)
Add a list of LinksMenu or (sub)Menu to the current one
array<mixed,\LinksMenuElement> | $menu_elements | A reference to a list of LinksMenuLink and / or Menu to add |
None found |
add(\LinksMenuElement $element)
Add a single LinksMenuLink or (sub) Menu
\LinksMenuElement | $element | the LinksMenuLink or Menu to add |
None found |
cache_export( $template = false) : string
$template |
the string to write in the cache file
None found |
get_menu_types_list() : array<mixed,string>
static method which returns all the menu types
The list of the menu types
static |
get_type() : string
the menu type
None found |
set_type(string $type)
Sets the type of the menu
string | $type | Type of the menu |
None found |
get_children() : array<mixed,\LinksMenuElement>
the menu children elements
None found |
_assign(\Template $template)
Assign tpl vars
\Template | $template | the template on which we gonna assign vars |
None found |
_parent(string $type)
Increase the Menu Depth and set the menu type to its parent one
string | $type | the type of the menu |
None found |
assign_common_template_variables(\Template $template)
Assign default tpl vars
\Template | $template | the template on which we gonna assign vars |
None found |
get_template_to_use() : \Template
None found |
get_default_template() : string
Get the default template of the menu
the default template of the menu
None found |
_get_url(string $string_url, boolean $compute_relative_url = true) : string
string | $string_url | the url to relativize / absolutize |
boolean | $compute_relative_url | If true, computes relative urls to the website root |
the $string_url url
None found |
$url : string
None found |
$image : string
None found |
$uid : integer
None found |
$depth : integer
None found |
$id : integer
None found |
$title : string
None found |
$auth : \int[string]
None found |
$enabled : boolean
None found |
$block : integer
None found |
$position : integer
None found |
$pushmenu_opening : string
None found |
$pushmenu_expanding : string
None found |
$filters : \Array<Filter>
None found |
$type : string
None found |
$elements : array<mixed,\LinksMenuElement>
None found |
$hidden_with_small_screens : boolean
None found |
$disabled_body : boolean
None found |
$pushed_content : boolean
None found |
$template : \Template
None found |
LINKS_MENU_ELEMENT__CLASS = 'LinksMenuElement'
None found |
LINKS_MENU_ELEMENT__FULL_DISPLAYING = true
None found |
LINKS_MENU_ELEMENT__CLASSIC_DISPLAYING = false
None found |
MENU_AUTH_BIT = 1
None found |
MENU_ENABLE_OR_NOT = 42
None found |
MENU_ENABLED = true
None found |
MENU_NOT_ENABLED = false
None found |
BLOCK_POSITION__NOT_ENABLED = 0
None found |
BLOCK_POSITION__HEADER = 1
None found |
BLOCK_POSITION__SUB_HEADER = 2
None found |
BLOCK_POSITION__TOP_CENTRAL = 3
None found |
BLOCK_POSITION__BOTTOM_CENTRAL = 4
None found |
BLOCK_POSITION__TOP_FOOTER = 5
None found |
BLOCK_POSITION__FOOTER = 6
None found |
BLOCK_POSITION__LEFT = 7
None found |
BLOCK_POSITION__RIGHT = 8
None found |
BLOCK_POSITION__ALL = 9
None found |
PUSHMENU_LEFT = 'left'
None found |
PUSHMENU_RIGHT = 'right'
None found |
PUSHMENU_TOP = 'top'
None found |
PUSHMENU_BOTTOM = 'bottom'
None found |
PUSHMENU_OVERLAP = 'overlap'
None found |
PUSHMENU_EXPAND = 'expand'
None found |
PUSHMENU_NONE = 'false'
None found |
MENU__CLASS = 'Menu'
None found |
LINKS_MENU__CLASS = 'LinksMenu'
None found |
AUTOMATIC_MENU = 'automatic'
None found |
VERTICAL_MENU = 'vertical'
None found |
HORIZONTAL_MENU = 'horizontal'
None found |
STATIC_MENU = 'static'
None found |
PUSH_MENU = 'push'
None found |
VERTICAL_SCROLLING_MENU = 'vertical_scrolling'
None found |
HORIZONTAL_SCROLLING_MENU = 'horizontal_scrolling'
None found |