Added full_name field to actors, and made the administer entities permission finer grained
This commit is contained in:
@ -49,15 +49,16 @@ class ContextualMenu extends BlockBase {
|
||||
*/
|
||||
private function generateLinksForAddingNewActivities($title, $query = []) {
|
||||
$title = t($title);
|
||||
$markup = "<h1>$title: </h1>";
|
||||
$markup = "<br /><p><strong>$title: </strong>";
|
||||
$allActivityTypes = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_activity');
|
||||
foreach($allActivityTypes as $machine_name => $activityType) {
|
||||
$label = $activityType['label'];
|
||||
$url = \Drupal\Core\Url::fromRoute("entity.oc_activity.add_form", ['oc_activity_type' => $machine_name]);
|
||||
$url->setOption('query', $query);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($label, $url)->toString();
|
||||
$markup .= "<p>$link</p>";
|
||||
$markup .= " $link";
|
||||
}
|
||||
$markup .= "</p>";
|
||||
return "<div class='openactor_add_links'>$markup</div>";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user