public function testSetValueShouldSetAction() { $obj = new Layout([]); $obj->setValue('action'); $this->assertEquals('action', $obj->getAction()); }
/** * Configures the layout context. * * @param ContextInterface $context * @param LayoutAnnotation $layoutAnnotation */ protected function configureContext(ContextInterface $context, LayoutAnnotation $layoutAnnotation) { $action = $layoutAnnotation->getAction(); if (!empty($action)) { $currentAction = $context->getOr('action'); if (empty($currentAction)) { $context->set('action', $action); } } $theme = $layoutAnnotation->getTheme(); if (!empty($theme)) { $currentTheme = $context->getOr('theme'); if (empty($currentTheme)) { $context->set('theme', $theme); } } $vars = $layoutAnnotation->getVars(); if (!empty($vars)) { $context->getResolver()->setRequired($vars); } }