public function linkResource(ResourceNode $resource)
    {
        if (!$this->isLinkedToResource($resource)) {
            $this->resources->add($resource);
            ++$this->resourceCount;
        }
    }
public function linkResource(ResourceNode $resource)
    {
        if (!$this->isLinkedToResource($resource)) {
            $this->resources->add($resource);
            ++$this->resourceCount;
        }
    }
public function linkResource ( ResourceNode $ resource ) { if ( ! $ this -> isLinkedToResource ( $ resource ) ) { $ this -> resources -> add ( $ resource ) ; ++ $ this -> resourceCount ; } }
Associates the ability with a resource.

@param ResourceNode $resource
Associates the ability with a resource .