protected function convertRelationType($stringType)
    {
        $stringTypeList = explode(',', strtoupper($stringType));
        $relationType = 0;

        foreach ($stringTypeList as $stringTypeValue) {
            switch ($stringTypeValue) {
                case 'COMMON':
                    $relationType |= Values\Content\Relation::COMMON;
                    break;
                case 'EMBED':
                    $relationType |= Values\Content\Relation::EMBED;
                    break;
                case 'LINK':
                    $relationType |= Values\Content\Relation::LINK;
                    break;
                case 'FIELD':
                    $relationType |= Values\Content\Relation::FIELD;
                    break;
                case 'ASSET':
                    $relationType |= Values\Content\Relation::ASSET;
                    break;
                default:
                    throw new \RuntimeException(
                        sprintf('Unknown Relation type: "%s"', $stringTypeValue)
                    );
            }
        }

        return $relationType;
    }
protected function convertRelationType($stringType)
    {
        $stringTypeList = explode(',', strtoupper($stringType));
        $relationType = 0;

        foreach ($stringTypeList as $stringTypeValue) {
            switch ($stringTypeValue) {
                case 'COMMON':
                    $relationType |= Values\Content\Relation::COMMON;
                    break;
                case 'EMBED':
                    $relationType |= Values\Content\Relation::EMBED;
                    break;
                case 'LINK':
                    $relationType |= Values\Content\Relation::LINK;
                    break;
                case 'FIELD':
                    $relationType |= Values\Content\Relation::FIELD;
                    break;
                case 'ASSET':
                    $relationType |= Values\Content\Relation::ASSET;
                    break;
                default:
                    throw new \RuntimeException(
                        sprintf('Unknown Relation type: "%s"', $stringTypeValue)
                    );
            }
        }

        return $relationType;
    }
protected function convertRelationType ( $ stringType ) { $ stringTypeList = explode ( ',' , strtoupper ( $ stringType ) ) ; $ relationType = 0 ; foreach ( $ stringTypeList as $ stringTypeValue ) { switch ( $ stringTypeValue ) { case 'COMMON' : $ relationType |= Values \ Content \ Relation :: COMMON ; break ; case 'EMBED' : $ relationType |= Values \ Content \ Relation :: EMBED ; break ; case 'LINK' : $ relationType |= Values \ Content \ Relation :: LINK ; break ; case 'FIELD' : $ relationType |= Values \ Content \ Relation :: FIELD ; break ; case 'ASSET' : $ relationType |= Values \ Content \ Relation :: ASSET ; break ; default : throw new \ RuntimeException ( sprintf ( 'Unknown Relation type: "%s"' , $ stringTypeValue ) ) ; } } return $ relationType ; }
Converts the string representation of the relation type to its constant.

@param string $stringType

@return int
Converts the string representation of the relation type to its constant .