plugin/competency/Manager/ResourceManager.php
public function loadLinkedCompetencies(ResourceNode $resource)
    {
        $abilities = $this->abilityRepo->findByResource($resource);
        $competencies = $this->competencyRepo->findByResource($resource);
        $result = [];

        foreach ($abilities as $ability) {
            $result[] = $this->loadAbility($ability);
        }

        foreach ($competencies as $competency) {
            $result[] = $this->loadCompetency($competency);
        }

        return $result;
    }
public function loadLinkedCompetencies(ResourceNode $resource)
    {
        $abilities = $this->abilityRepo->findByResource($resource);
        $competencies = $this->competencyRepo->findByResource($resource);
        $result = [];

        foreach ($abilities as $ability) {
            $result[] = $this->loadAbility($ability);
        }

        foreach ($competencies as $competency) {
            $result[] = $this->loadCompetency($competency);
        }

        return $result;
    }
public function loadLinkedCompetencies ( ResourceNode $ resource ) { $ abilities = $ this -> abilityRepo -> findByResource ( $ resource ) ; $ competencies = $ this -> competencyRepo -> findByResource ( $ resource ) ; $ result = [ ] ; foreach ( $ abilities as $ ability ) { $ result [ ] = $ this -> loadAbility ( $ ability ) ; } foreach ( $ competencies as $ competency ) { $ result [ ] = $ this -> loadCompetency ( $ competency ) ; } return $ result ; }
Returns an array representation of all the competencies and abilities
linked to a given resource, along with their path in their competency
framework. Competencies and abilities are distinguished from each other
by the "type" key.

@param ResourceNode $resource

@return array
Returns an array representation of all the competencies and abilities linked to a given resource along with their path in their competency framework . Competencies and abilities are distinguished from each other by the type key .