comparison core/modules/node/src/NodeListBuilder.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
22 * The date formatter service. 22 * The date formatter service.
23 * 23 *
24 * @var \Drupal\Core\Datetime\DateFormatterInterface 24 * @var \Drupal\Core\Datetime\DateFormatterInterface
25 */ 25 */
26 protected $dateFormatter; 26 protected $dateFormatter;
27
28 /**
29 * The redirect destination service.
30 *
31 * @var \Drupal\Core\Routing\RedirectDestinationInterface
32 */
33 protected $redirectDestination;
34 27
35 /** 28 /**
36 * Constructs a new NodeListBuilder object. 29 * Constructs a new NodeListBuilder object.
37 * 30 *
38 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type 31 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
126 } 119 }
127 $row['operations']['data'] = $this->buildOperations($entity); 120 $row['operations']['data'] = $this->buildOperations($entity);
128 return $row + parent::buildRow($entity); 121 return $row + parent::buildRow($entity);
129 } 122 }
130 123
131 /**
132 * {@inheritdoc}
133 */
134 protected function getDefaultOperations(EntityInterface $entity) {
135 $operations = parent::getDefaultOperations($entity);
136
137 $destination = $this->redirectDestination->getAsArray();
138 foreach ($operations as $key => $operation) {
139 $operations[$key]['query'] = $destination;
140 }
141 return $operations;
142 }
143
144 } 124 }