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