Skip to content

Instantly share code, notes, and snippets.

name: Example Rest
type: module
description: Example module Rest service.
core: 8.x
package: Example
<?php
namespace Drupal\manage_inventory\Entity\Controller;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Url;
/**
* Provides a list controller for content_entity_manage_inventory entity.
*
name: Manage Inventory
type: module
description: 'Provides Inventory entity.'
package: Custom
core: 8.x
package: Custom
batch_example.delete_node_example:
path: '/batch-example/delete'
defaults:
_form: '\Drupal\batch_example\Form\DeleteNodeForm'
_title: 'Batch Example'
requirements:
_permission: 'access content'
name: batch_example
type: module
description: Example module for batch process
core: 8.x
package: Example
<?php
namespace Drupal\example_rest\Plugin\rest\resource;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\rest\Plugin\ResourceBase;
use Drupal\rest\ResourceResponse;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Psr\Log\LoggerInterface;
<?php
namespace Drupal\batch_example;
use Drupal\node\Entity\Node;
class DeleteNode {
public static function deleteNodeExample($nids, &$context){
<?php
namespace Drupal\batch_example\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Class DeleteNodeForm.
*
<?php
namespace Drupal\article_queue\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Class ArticleSettingsForm.
*/
name: Article Queue
type: module
description: This module will provide an exapmle for queue worker.
core: 8.x
package: Custom
dependencies:
- ultimate_cron
- queue_ui