Created
May 12, 2020 18:25
-
-
Save shadcn/f9e1ad24b7f630a94fc5ace6b53d7229 to your computer and use it in GitHub Desktop.
Revisions
-
shadcn created this gist
May 12, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <?php // Place in `custom_module/src/Entity/ListBuilder/PurchasedPlanListBuilder.php` namespace Drupal\custom_module\Entity\ListBuilder; use Drupal\apigee_m10n\Entity\ListBuilder\PurchasedPlanListBuilder as ApigeePurchasedPlanListBuilder; class PurchasedPlanListBuilder extends ApigeePurchasedPlanListBuilder { /** * {@inheritdoc} */ public function render() { $build = parent::render() // Do your own thing here. // You can inspect $build and change things. return $build; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <?php // Place in `custom_module/custom_module.module` use Drupal\custom_module\Entity\ListBuilder\PurchasedPlanListBuilder; /** * Implements hook_entity_type_alter(). */ function custom_module_entity_type_alter(array &$entity_types) { // Set the list builder to use the custom one we implemented. $entity_types['purchased_plan']->setListBuilderClass(PurchasedPlanListBuilder::class); }