Drupal 8 Blueprints: Step along the creation of 7 professional-grade Drupal sites by Burrows Alex

Drupal 8 Blueprints: Step along the creation of 7 professional-grade Drupal sites by Burrows Alex

Author:Burrows, Alex [Burrows, Alex]
Language: eng
Format: azw3
Tags: COM060160 - COMPUTERS / Web / Web Programming, COM060080 - COMPUTERS / Web / General, COM060130 - COMPUTERS / Web / Design
Publisher: Packt Publishing
Published: 2017-09-22T04:00:00+00:00


Fig 1.10 : Our donation block showing what's been raised

In Fig 1.10, the fundraising content type has been tidied up a bit, and our Donation range amount is now showing.

However, it doesn't look that attractive, so what we will do next is make this editable for our themer.

DonateRangeBlock.php

<?php

namespace Drupal\donate_range\Plugin\Block;

use Drupal\node\Entity\Node;

use Drupal\Core\Block\BlockBase;

/**

* Class DonateRangeBlock

* @package Drupal\donate_range\Form

*

* @Block(

* id = "donate_range_block",

* admin_label = @Translation("Donation range block"),

* category = @Translation("Custom")

* )

*/

class DonateRangeBlock extends BlockBase {



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.