This repository has been archived on 2022-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
opencase/modules/opencase_reporting/src/Plugin/Block/Presets.php

30 lines
645 B
PHP

<?php
namespace Drupal\opencase_reporting\Plugin\Block;
use Drupal\opencase\EntityTypeRelations;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Link;
use Drupal\Core\Url;
/**
* Provides a block for loading, saving and creating report presets.
*
* @Block(
* id = "opencase_reporting_presets",
* admin_label = @Translation("OpenCase Reporting Presets"),
* )
*/
class Presets extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
return array(
'#presets' => array(array('title'=>'me', 'url'=>'you'), array('title'=>'them', 'url'=>'us')),
'#theme' => 'opencase_reporting_presets'
);
}
}