t('Description'), 'class' => array(RESPONSIVE_PRIORITY_MEDIUM), ); return $header + parent::buildHeader(); } /** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $row['title'] = array( 'data' => $this->getLabel($entity), 'class' => array('menu-label'), ); $row['description'] = Xss::filterAdmin($entity->getDescription()); return $row + parent::buildRow($entity); } /** * {@inheritdoc} */ public function getDefaultOperations(EntityInterface $entity) { $operations = parent::getDefaultOperations($entity); // Place the edit operation after the operations added by field_ui.module // which have the weights 15, 20, 25. if (isset($operations['edit'])) { $operations['edit']['weight'] = 30; } return $operations; } /** * {@inheritdoc} */ public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('No content types available. Add content type.', [ '@link' => Url::fromRoute('node.type_add')->toString() ]); return $build; } }