Browse Source

Amending HeartbeatStreamServices

logicp 8 years ago
parent
commit
4156c6856f
3 changed files with 3 additions and 9 deletions
  1. 1 5
      heartbeat8.module
  2. 1 1
      src/Controller/TestController.php
  3. 1 3
      src/HeartbeatStreamServices.php

+ 1 - 5
heartbeat8.module

@@ -72,10 +72,10 @@ function heartbeat8_theme_suggestions_heartbeat(array $variables) {
  */
 function heartbeat8_entity_insert(EntityInterface $entity) {
 
-  $thisiswhere = 'ithappens';
   $nid = $entity->id();
 
   if ($nid) {
+
     $heartbeatTypeService = \Drupal::service('heartbeat8.heartbeattype');
 
     foreach ($heartbeatTypeService->getTypes() as $type) {
@@ -85,10 +85,6 @@ function heartbeat8_entity_insert(EntityInterface $entity) {
     }
   }
 
-  \Drupal::logger('content')->notice('Entity Insert
-   called !');
-
-
 }
 
 //TODO Add heartbeat language to Javascript

+ 1 - 1
src/Controller/TestController.php

@@ -53,7 +53,7 @@ class TestController extends ControllerBase {
    */
   public function start($arg) {
 
-    $streamEntities = $this->heartbeatstream->loadAllEntities()->execute();
+    $streamEntities = $this->heartbeatstream->loadAllEntities();
 
     foreach ($streamEntities as $streamEntityId) {
 

+ 1 - 3
src/HeartbeatStreamServices.php

@@ -75,9 +75,7 @@ class HeartbeatStreamServices {
    * @return mixed
    */
   public function loadAllEntities() {
-    $jigga = $this->entityQuery->get('heartbeat_stream');
-    $jiggais =' nada';
-    return $jigga;
+    return $this->entityQuery->get('heartbeat_stream')->execute();
   }