$form['#attributes'
]['class'
] =
['form-edit'
];
if ($view->
isLocked()) { $form['locked'
] =
[ '#type' => 'container',
'#attributes' =>
['class' =>
['view-locked', 'messages', 'messages--warning'
]],
'#weight' => -10,
'message' =>
[ '#type' => 'break_lock_link',
'#label' =>
$view->
getEntityType()->
getSingularLabel(),
'#lock' =>
$view->
getLock(),
'#url' =>
$view->
toUrl('break-lock-form'
),
],
];
} else { $form['changed'
] =
[ '#type' => 'container',
'#attributes' =>
['class' =>
['view-changed', 'messages', 'messages--warning'
]],
'#children' =>
$this->
t('You have unsaved changes.'
),
'#weight' => -10,
];