Hygiene: reduce getPageActions() visibility
- Reduce MinervaTemplate.getPageActions() visibility from public to protected. No one seems to use it. - Use camelCase instead of lowercase for the pageActionMenu.mustache template's pageActions variable. writingwithcaseindifference is difficult to read and the templates seem to support casing. Change-Id: I6d283c7b97eeef6902cb010904748bd8c72b660c
This commit is contained in:
parent
88854b90d4
commit
a3e524192d
|
@ -49,7 +49,7 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
* Returns available page actions
|
* Returns available page actions
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getPageActions() {
|
protected function getPageActions() {
|
||||||
return $this->isFallbackEditor() ? [] : $this->data['page_actions'];
|
return $this->isFallbackEditor() ? [] : $this->data['page_actions'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
if ( $actions ) {
|
if ( $actions ) {
|
||||||
$html = $templateParser->processTemplate( 'pageActionMenu', [ 'pageactions' => $actions ] );
|
$html = $templateParser->processTemplate( 'pageActionMenu', [ 'pageActions' => $actions ] );
|
||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<nav class="page-actions-menu">
|
<nav class="page-actions-menu">
|
||||||
<ul id="page-actions" class="page-actions-menu__list">
|
<ul id="page-actions" class="page-actions-menu__list">
|
||||||
{{#pageactions}}
|
{{#pageActions}}
|
||||||
<li id="{{item-id}}" class="page-actions-menu__list-item">
|
<li id="{{item-id}}" class="page-actions-menu__list-item">
|
||||||
<a id="{{id}}" href="{{href}}" class="{{class}}" role="button" title="{{title}}">
|
<a id="{{id}}" href="{{href}}" class="{{class}}" role="button" title="{{title}}">
|
||||||
{{text}}
|
{{text}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{/pageactions}}
|
{{/pageActions}}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue