easy_social-8.x-3.x-dev/src/Plugin/Block/EasySocialBlock.php

src/Plugin/Block/EasySocialBlock.php
<?php

namespace Drupal\easy_social\Plugin\Block;

use Drupal\Core\Block\BlockBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;

/**
 * Provides an Easy Social block.
 *
 * @Block(
 *   id = "easy_social_block",
 *   admin_label = @Translation("Easy Social"),
 * )
 */
class EasySocialBlock extends BlockBase {

  /**
   * Implements \Drupal\Block\BlockBase::blockBuild().
   */
  public function build() {
    $content = [
      '#theme' => 'easy_social',
    ];

    return [
      '#children' => \Drupal::service('renderer')->render($content),
    ];
  }

}

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

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