X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=blobdiff_plain;f=includes%2FSkin.php;h=4889863710167a223dcb87c2d1c5b102b3404b01;hb=ceeb0a9976cd19d258e6f3c1cea170e855e1642e;hp=9e5613e9824c10f5f526cff70e8e95b63e466ded;hpb=47a5e369d7c0e129da081fa77c3e3d418e86d780;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Skin.php b/includes/Skin.php index 9e5613e982..4889863710 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1132,7 +1132,23 @@ abstract class Skin extends ContextSource { } /** - * Build an array that represents the sidebar(s), the navigation bar among them + * Build an array that represents the sidebar(s), the navigation bar among them. + * + * BaseTemplate::getSidebar can be used to simplify the format and id generation in new skins. + * + * The format of the returned array is array( heading => content, ... ), where: + * - heading is the heading of a navigation portlet. It is either: + * - magic string to be handled by the skins ('SEARCH' / 'LANGUAGES' / 'TOOLBOX' / ...) + * - a message name (e.g. 'navigation'), the message should be HTML-escaped by the skin + * - plain text, which should be HTML-escaped by the skin + * - content is the contents of the portlet. It is either: + * - HTML text () + * - array of link data in a format accepted by BaseTemplate::makeListItem() + * - (for a magic string as a key, any value) + * + * Note that extensions can control the sidebar contents using the SkinBuildSidebar hook + * and can technically insert anything in here; skin creators are expected to handle + * values described above. * * @return array */