public function GdprMyAgreementsBlock::build in General Data Protection Regulation 8
Same name and namespace in other branches
- 8.2 modules/gdpr_consent/src/Plugin/Block/GdprMyAgreementsBlock.php \Drupal\gdpr_consent\Plugin\Block\GdprMyAgreementsBlock::build()
- 3.0.x modules/gdpr_consent/src/Plugin/Block/GdprMyAgreementsBlock.php \Drupal\gdpr_consent\Plugin\Block\GdprMyAgreementsBlock::build()
Builds and returns the renderable array for this block plugin.
If a block should not be rendered because it has no content, then this method must also ensure to return no content: it must then only return an empty array, or an empty array with #cache set (with cacheability metadata indicating the circumstances for it being empty).
Return value
array A renderable array representing the content of the block.
Overrides BlockPluginInterface::build
See also
\Drupal\block\BlockViewBuilder
File
- modules/
gdpr_consent/ src/ Plugin/ Block/ GdprMyAgreementsBlock.php, line 89
Class
- GdprMyAgreementsBlock
- Provides a block to view a contact dashboard summary.
Namespace
Drupal\gdpr_consent\Plugin\BlockCode
public function build() {
// Just delegate to the controller to do the work.
$ctrl = $this->classResolver
->getInstanceFromDefinition(ConsentAgreementController::class);
return $ctrl
->myAgreements($this->currentUser);
}