moderation_note-8.x-1.0-beta3/src/ModerationNoteViewBuilder.php

src/ModerationNoteViewBuilder.php
<?php

namespace Drupal\moderation_note;

use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityViewBuilder;

/**
 * View builder handler for moderation notes.
 */
class ModerationNoteViewBuilder extends EntityViewBuilder {

  /**
   * {@inheritdoc}
   */
  protected function alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
    $build['#attached']['library'][] = 'moderation_note/main';
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc