private function DynamicLayout::getEditColumnLink in Dynamic Layouts 8
3 calls to DynamicLayout::getEditColumnLink()
- DynamicLayout::addColumn in src/
Entity/ DynamicLayout.php - Add a column to a row.
- DynamicLayout::addRow in src/
Entity/ DynamicLayout.php - Add a row to the layout.
- DynamicLayout::addStartingRows in src/
Entity/ DynamicLayout.php - Add multiple rows to the layout.
File
- src/
Entity/ DynamicLayout.php, line 519
Class
- DynamicLayout
- Defines the DynamicLayout entity.
Namespace
Drupal\dynamic_layouts\EntityCode
private function getEditColumnLink($entity_id, $row_id, $column_id) {
$edit_column_url = Url::fromRoute('dynamic_layouts.edit_column_modal_form', [
Constants::COLUMN_ID => $column_id,
'entity_id' => $entity_id,
Constants::ROW_ID => $row_id,
]);
$title = t('Edit column');
$link_options = [
'attributes' => [
'class' => [
'edit-link',
'btn',
'use-ajax',
],
'title' => $title,
],
];
$edit_column_url
->setOptions($link_options);
$edit_column_link = Link::fromTextAndUrl($title, $edit_column_url);
$edit_column = $edit_column_link
->toRenderable();
return render($edit_column);
}