protected function AddVariantContextsForm::isEditableContext in Page Manager 8.4
Same name and namespace in other branches
- 8 page_manager_ui/src/Form/AddVariantContextsForm.php \Drupal\page_manager_ui\Form\AddVariantContextsForm::isEditableContext()
Parameters
mixed $cached_values:
string $row:
Return value
bool
Overrides ManageContext::isEditableContext
File
- page_manager_ui/
src/ Form/ AddVariantContextsForm.php, line 124
Class
Namespace
Drupal\page_manager_ui\FormCode
protected function isEditableContext($cached_values, $row) {
/** @var \Drupal\page_manager\PageVariantInterface $page_variant */
$page_variant = $cached_values['page_variant'];
$page = $page_variant
->getPage();
return empty($page
->getContexts()[$row]) && !empty($page_variant
->getContexts()[$row]);
}