Bundle/CoreBundle/Entity/Link.php
public function checkLink(ExecutionContextInterface $context)
    {
        $violation = false;
        // check if the name is actually a fake name
        switch ($this->getLinkType()) {
            case self::TYPE_VIEW_REFERENCE:
            $violation = $this->getViewReference() == null;
                break;
            case self::TYPE_ROUTE:
            $violation = $this->getRoute() == null;
                break;
            case self::TYPE_URL:
            $violation = $this->getUrl() == null;
                break;
            case self::TYPE_WIDGET:
            $violation = $this->getAttachedWidget() == null;
                break;
            default:
                break;
        }

        if ($violation) {
            $context->buildViolation('validator.link.error.message.'.$this->getLinkType().'Missing')->addViolation();
        }
    }
public function checkLink(ExecutionContextInterface $context)
    {
        $violation = false;
        // check if the name is actually a fake name
        switch ($this->getLinkType()) {
            case self::TYPE_VIEW_REFERENCE:
            $violation = $this->getViewReference() == null;
                break;
            case self::TYPE_ROUTE:
            $violation = $this->getRoute() == null;
                break;
            case self::TYPE_URL:
            $violation = $this->getUrl() == null;
                break;
            case self::TYPE_WIDGET:
            $violation = $this->getAttachedWidget() == null;
                break;
            default:
                break;
        }

        if ($violation) {
            $context->buildViolation('validator.link.error.message.'.$this->getLinkType().'Missing')->addViolation();
        }
    }
public function checkLink ( ExecutionContextInterface $ context ) { $ violation = false ; // check if the name is actually a fake name switch ( $ this -> getLinkType ( ) ) { case self :: TYPE_VIEW_REFERENCE : $ violation = $ this -> getViewReference ( ) == null ; break ; case self :: TYPE_ROUTE : $ violation = $ this -> getRoute ( ) == null ; break ; case self :: TYPE_URL : $ violation = $ this -> getUrl ( ) == null ; break ; case self :: TYPE_WIDGET : $ violation = $ this -> getAttachedWidget ( ) == null ; break ; default : break ; } if ( $ violation ) { $ context -> buildViolation ( 'validator.link.error.message.' . $ this -> getLinkType ( ) . 'Missing' ) -> addViolation ( ) ; } }
undocumented function.

@param ExecutionContextInterface $context

@author
undocumented function .