X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Ftemplates%2Fmodule%2Fsrc%2Flistbuilder-entity-content.php.twig;h=46af6648cf76568578b10d6eb4fbb9fc2b1d81af;hp=1615da80690dbfadb2c7f38a3a2621f347cc16dd;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/templates/module/src/listbuilder-entity-content.php.twig b/vendor/drupal/console/templates/module/src/listbuilder-entity-content.php.twig index 1615da806..46af6648c 100644 --- a/vendor/drupal/console/templates/module/src/listbuilder-entity-content.php.twig +++ b/vendor/drupal/console/templates/module/src/listbuilder-entity-content.php.twig @@ -11,8 +11,7 @@ namespace Drupal\{{module}}; {% block use_class %} use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityListBuilder; -use Drupal\Core\Routing\LinkGeneratorTrait; -use Drupal\Core\Url; +use Drupal\Core\Link; {% endblock %} {% block class_declaration %} @@ -22,9 +21,6 @@ use Drupal\Core\Url; * @ingroup {{ module }} */ class {{ entity_class }}ListBuilder extends EntityListBuilder {% endblock %} -{% block use_trait %} - use LinkGeneratorTrait; -{% endblock %} {% block class_methods %} /** @@ -42,13 +38,10 @@ class {{ entity_class }}ListBuilder extends EntityListBuilder {% endblock %} public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\{{module}}\Entity\{{ entity_class }} */ $row['id'] = $entity->id(); - $row['name'] = $this->l( + $row['name'] = Link::createFromRoute( $entity->label(), - new Url( - 'entity.{{ entity_name }}.edit_form', array( - '{{ entity_name }}' => $entity->id(), - ) - ) + 'entity.{{ entity_name }}.edit_form', + ['{{ entity_name }}' => $entity->id()] ); return $row + parent::buildRow($entity); }