use Drupal\Core\Entity\EntityInterface;`
function hook_entity_presave(EntityInterface $entity) {
if($entity->getEntityTypeId() == 'my_entity_type' && $entity->bundle() == 'my_content_type') {
// Do your stuff here
}
}
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 characters
| services: | |
| appserver: | |
| xdebug: true | |
| config: | |
| php: .lando/config/php.ini |
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 characters
| name: drupal8postgresql | |
| recipe: drupal8 | |
| proxy: | |
| appserver: | |
| - drupal8postgresql.lndo.site | |
| pgadmin: | |
| - drupal8postgresql-pgadmin.lndo.site | |
| config: | |
| webroot: web | |
| composer_version: '2' |
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 characters
| #Lando file for angular app + storybook | |
| name: angular-app | |
| excludes: | |
| - ./node_modules | |
| proxy: | |
| front: | |
| - angular-app.lndo.site:4200 | |
| - storybook-app.lndo.site:6006 | |
| services: | |
| front: |
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 characters
| name: my_react_app | |
| recipe: mean | |
| config: | |
| node: 16 | |
| build: | |
| - npm install | |
| command: npm start | |
| globals: [] | |
| port: 3000 |