Loading src/Controller/GuidelineJsonController.php +2 −4 Changes for src/Controller/GuidelineJsonController.php: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace Drupal\guidelines\Controller; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Extension\ModuleHandler; use Drupal\guidelines\Entity\Guideline; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; Loading @@ -26,7 +25,7 @@ class GuidelineJsonController extends ControllerBase { /** * Constructs a new entity. * * @param Drupal\Core\Entity\EntityTypeManager $entity * @param Drupal\Core\Entity\EntityTypeManager $entity_type_manager * This is pointing to the object of enitytype manager. */ public function __construct(EntityTypeManager $entity_type_manager) { Loading @@ -47,7 +46,6 @@ class GuidelineJsonController extends ControllerBase { * * @param string $entity_type * The entity type. * * @param string $bundle * The entity bundle. * Loading @@ -62,7 +60,7 @@ class GuidelineJsonController extends ControllerBase { foreach ($guidelines as $guideline) { foreach ($guideline->field_field as $field) { [$e, $b, $f] = explode('.', $field->value); [, $b, $f] = explode('.', $field->value); if (!empty($bundle) && $bundle === $b) { $view_builder = $this->entityTypeManager()->getViewBuilder('guideline'); $pre_render = $view_builder->view($guideline, 'default'); Loading Loading
src/Controller/GuidelineJsonController.php +2 −4 Changes for src/Controller/GuidelineJsonController.php: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace Drupal\guidelines\Controller; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Extension\ModuleHandler; use Drupal\guidelines\Entity\Guideline; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; Loading @@ -26,7 +25,7 @@ class GuidelineJsonController extends ControllerBase { /** * Constructs a new entity. * * @param Drupal\Core\Entity\EntityTypeManager $entity * @param Drupal\Core\Entity\EntityTypeManager $entity_type_manager * This is pointing to the object of enitytype manager. */ public function __construct(EntityTypeManager $entity_type_manager) { Loading @@ -47,7 +46,6 @@ class GuidelineJsonController extends ControllerBase { * * @param string $entity_type * The entity type. * * @param string $bundle * The entity bundle. * Loading @@ -62,7 +60,7 @@ class GuidelineJsonController extends ControllerBase { foreach ($guidelines as $guideline) { foreach ($guideline->field_field as $field) { [$e, $b, $f] = explode('.', $field->value); [, $b, $f] = explode('.', $field->value); if (!empty($bundle) && $bundle === $b) { $view_builder = $this->entityTypeManager()->getViewBuilder('guideline'); $pre_render = $view_builder->view($guideline, 'default'); Loading