Created
November 17, 2021 16:44
-
-
Save weitzman/689882efc1bbec7aa9155e53724603b8 to your computer and use it in GitHub Desktop.
Bundle classes generated by Drush
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\node; | |
/** | |
* A bundle class for node entities. | |
*/ | |
class Article extends NodeBundleBase { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
/** | |
* A bundle class for media entities. | |
*/ | |
class Audio extends MediaBundleBase { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
/** | |
* A bundle class for media entities. | |
*/ | |
class Document extends MediaBundleBase { | |
} |
This file contains 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 characters
<?php | |
/** | |
* @file | |
* Primary module hooks for drush_empty_module module. | |
*/ | |
/** | |
* Implements hook_entity_bundle_info_alter(). | |
*/ | |
function drush_empty_module_entity_bundle_info_alter(array &$bundles): void { | |
$bundles['node']['article']['class'] = \Drupal\drush_empty_module\Bundle\node\Article::class; | |
$bundles['node']['page']['class'] = \Drupal\drush_empty_module\Bundle\node\Page::class; | |
$bundles['media']['audio']['class'] = \Drupal\drush_empty_module\Bundle\media\Audio::class; | |
$bundles['media']['document']['class'] = \Drupal\drush_empty_module\Bundle\media\Document::class; | |
$bundles['media']['image']['class'] = \Drupal\drush_empty_module\Bundle\media\Image::class; | |
$bundles['media']['remote_video']['class'] = \Drupal\drush_empty_module\Bundle\media\RemoteVideo::class; | |
$bundles['media']['video']['class'] = \Drupal\drush_empty_module\Bundle\media\Video::class; | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
/** | |
* A bundle class for media entities. | |
*/ | |
class Image extends MediaBundleBase { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
use Drupal\media\Entity\Media; | |
/** | |
* A base bundle class for media entities. | |
*/ | |
abstract class MediaBundleBase extends Media { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\node; | |
use Drupal\node\Entity\Node; | |
/** | |
* A base bundle class for node entities. | |
*/ | |
abstract class NodeBundleBase extends Node { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\node; | |
/** | |
* A bundle class for node entities. | |
*/ | |
class Page extends NodeBundleBase { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
/** | |
* A bundle class for media entities. | |
*/ | |
class RemoteVideo extends MediaBundleBase { | |
} |
This file contains 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 characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\media; | |
/** | |
* A bundle class for media entities. | |
*/ | |
class Video extends MediaBundleBase { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment