public function determineListDisplayStrategy(ModelRelationData $data)
    {
        switch ($data->type) {

            case RelationType::BELONGS_TO:
            case RelationType::BELONGS_TO_THROUGH:
            case RelationType::HAS_ONE:
            case RelationType::MORPH_ONE:
            case RelationType::MORPH_TO:
                return ListDisplayStrategy::RELATION_REFERENCE;

            case RelationType::BELONGS_TO_MANY:
            case RelationType::HAS_MANY:
            case RelationType::MORPH_MANY:
            case RelationType::MORPH_TO_MANY:
            case RelationType::MORPHED_BY_MANY:
                return ListDisplayStrategy::RELATION_COUNT;
        }

        return null;
    }
public function determineListDisplayStrategy(ModelRelationData $data)
    {
        switch ($data->type) {

            case RelationType::BELONGS_TO:
            case RelationType::BELONGS_TO_THROUGH:
            case RelationType::HAS_ONE:
            case RelationType::MORPH_ONE:
            case RelationType::MORPH_TO:
                return ListDisplayStrategy::RELATION_REFERENCE;

            case RelationType::BELONGS_TO_MANY:
            case RelationType::HAS_MANY:
            case RelationType::MORPH_MANY:
            case RelationType::MORPH_TO_MANY:
            case RelationType::MORPHED_BY_MANY:
                return ListDisplayStrategy::RELATION_COUNT;
        }

        return null;
    }
public function determineListDisplayStrategy ( ModelRelationData $ data ) { switch ( $ data -> type ) { case RelationType :: BELONGS_TO : case RelationType :: BELONGS_TO_THROUGH : case RelationType :: HAS_ONE : case RelationType :: MORPH_ONE : case RelationType :: MORPH_TO : return ListDisplayStrategy :: RELATION_REFERENCE ; case RelationType :: BELONGS_TO_MANY : case RelationType :: HAS_MANY : case RelationType :: MORPH_MANY : case RelationType :: MORPH_TO_MANY : case RelationType :: MORPHED_BY_MANY : return ListDisplayStrategy :: RELATION_COUNT ; } return null ; }
Determines a list display strategy string for given relation data.

@param ModelRelationData $data
@return string|null
Determines a list display strategy string for given relation data .