public function setCreatedResourceLink(TimelineLinkEvent $event): void
    {
        $action = $event->getAction();

        if ('created_resource' != $action->getVerb()) {
            return;
        }

        $production = $action->getComponent('indirectComplement')->getData();
        $resource = $action->getComponent('directComplement')->getData();
        $event->setLink($this->url_generator->generate('bkstg_resource_read', [
            'id' => $resource->getId(),
            'production_slug' => $production->getSlug(),
        ]));
    }
public function setCreatedResourceLink(TimelineLinkEvent $event): void
    {
        $action = $event->getAction();

        if ('created_resource' != $action->getVerb()) {
            return;
        }

        $production = $action->getComponent('indirectComplement')->getData();
        $resource = $action->getComponent('directComplement')->getData();
        $event->setLink($this->url_generator->generate('bkstg_resource_read', [
            'id' => $resource->getId(),
            'production_slug' => $production->getSlug(),
        ]));
    }
public function setCreatedResourceLink ( TimelineLinkEvent $ event ) : void { $ action = $ event -> getAction ( ) ; if ( 'created_resource' != $ action -> getVerb ( ) ) { return ; } $ production = $ action -> getComponent ( 'indirectComplement' ) -> getData ( ) ; $ resource = $ action -> getComponent ( 'directComplement' ) -> getData ( ) ; $ event -> setLink ( $ this -> url_generator -> generate ( 'bkstg_resource_read' , [ 'id' => $ resource -> getId ( ) , 'production_slug' => $ production -> getSlug ( ) , ] ) ) ; }
Set the link for the created resource.

@param TimelineLinkEvent $event The timeline link event.

@return void
Set the link for the created resource .