Ver Fonte

Update vendor ik/workflow-bundle. Se agrego listener para asignar workflow y currentState

Guillermo Espinoza há 7 anos atrás
pai
commit
53124e0883
2 ficheiros alterados com 3 adições e 16 exclusões
  1. 2 2
      composer.lock
  2. 1 14
      src/FTTHBundle/Entity/ONU.php

+ 2 - 2
composer.lock

@@ -1653,7 +1653,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
-                "reference": "4de74f50d761828334eb9709d4e23ee145a28c6f"
+                "reference": "349792b40559f48a6d8021156c22e8a989737c5e"
             },
             "require": {
                 "php-amqplib/rabbitmq-bundle": "^1.12"
@@ -1683,7 +1683,7 @@
                 "bundle",
                 "workflow"
             ],
-            "time": "2017-09-05 13:41:17"
+            "time": "2017-09-05 14:54:41"
         },
         {
             "name": "incenteev/composer-parameter-handler",

+ 1 - 14
src/FTTHBundle/Entity/ONU.php

@@ -5,7 +5,6 @@ namespace FTTHBundle\Entity;
 use Base\AdminBundle\Traits\TenancyIdTrait;
 use Base\AdminBundle\Traits\TenancyIdTraitInterface;
 use Doctrine\ORM\Mapping as ORM;
-use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
 use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
 use Gedmo\Mapping\Annotation as Gedmo;
 use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
@@ -23,7 +22,6 @@ use WorkflowBundle\Entity\Traits\WorkflowTrait;
  * ONU
  *
  * @ORM\Entity
- * @ORM\HasLifecycleCallbacks
  * @UniqueEntity(fields={"ponSerialNumber", "tenancyId"}, message="errors.duplicate_key")
  * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"pon_serial_number", "tenancy_id"})})
  *
@@ -432,19 +430,8 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
     }
 
     /**
-     * @ORM\PrePersist
+     * @return string
      */
-    public function prePersist(LifecycleEventArgs $event)
-    {
-        $this->currentState = null;
-
-        $workflow = $this->getWorkflow();
-
-        if ($workflow) {
-            $this->currentState = $workflow->getInitialPlace($this);
-        }
-    }
-
     public function getAdministrativeWorkflow()
     {
         return "administrative_state";