Background
content_actions template variable was used as a catch all for any menu. As we move towards a world where skins declare their own menus and away from PHP based templating it doesn't make sense to have this template variable. In fact, the behaviour in 1.46 is currently very different to pre-1.46
Deprecating this will allow us to remove additional complexity from the skin level.
Migration notes
Skins using $this->data['content_actions'] will need to replace this with $this->getContentActionsClassic()
/**
* Backwards compatibility method to get content actions the "classic way"
* (T423303).
*
* @return array
*/
private function getContentActionsClassic() {
$cNav = $this->get( 'content_navigation' );
$contentActions = [];
$menus = $this->getSkin()->getOptions()['menus'];
$contentActionMenus = array_diff( $menus, [
'user-menu', 'notifications', 'user-interface-preferences', 'user-page'
] );
foreach( $contentActionMenus as $key ) {
$contentActions = array_merge( $contentActions, $cNav[$key] );
}
return $contentActions;
}User story
As a developer of the skin core architecture, I want to keep the system as simple as possible and easy to maintainer.
Requirements
- Deprecate the template variable
$content_actions = $this->buildContentActionUrls( $content_navigation ); $tpl->set( 'content_actions', $content_actions );
BDD
- For QA engineer to fill out
Test Steps
- For QA engineer to fill out
Design
- Add mockups and design requirements
Acceptance criteria
- Add acceptance criteria
Communication criteria - does this need an announcement or discussion?
- Add communication criteria
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
This task was created by Version 1.2.0 of the Web team task template using phabulous