/** * Replaces `type` value by "page" and `id` value by "page-id-<nid>". * * The following class names are added: * * - `slug`: "page-slug-<slug>" * - `home`: true if the page is the home page. * - `active`: true if the page is the active page. * - `trail`: true if the page is in the breadcrumb trail. * - `node-id`: "node-id-<nid>" if the page displays a node. * - `node-constructor`: "node-constructor-<normalized_constructor>" if the page displays a node. * - `template`: "template-<name>" the name of the page's template, without its extension. */ protected function get_css_class_names() { $names = array_merge(parent::get_css_class_names(), array('type' => 'page', 'id' => 'page-id-' . $this->nid, 'slug' => 'page-slug-' . $this->slug, 'home' => $this->home->nid == $this->nid, 'active' => $this->is_active, 'trail' => $this->is_trail, 'template' => 'template-' . preg_replace('#\\.(html|php)$#', '', $this->template), 'has-children' => count($this->navigation_children) != 0)); if (isset($this->node)) { $node = $this->node; $names['node-id'] = 'node-id-' . $node->nid; $names['node-constructor'] = 'node-constructor-' . \ICanBoogie\normalize($node->constructor); } return $names; }