src/Models/CmsModel.php
protected function getKeysForSpecialRelation($specialType, $foreignKey = null)
    {
        switch ($specialType) {

            case static::RELATION_TYPE_FILE:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.files.keys.entry');
                $secondaryKey = config('pxlcms.relations.files.keys.field');
                break;

            case static::RELATION_TYPE_CHECKBOX:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.checkboxes.keys.entry');
                $secondaryKey = config('pxlcms.relations.checkboxes.keys.field');
                break;

            case static::RELATION_TYPE_IMAGE:
            default:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.images.keys.entry');
                $secondaryKey = config('pxlcms.relations.images.keys.field');
        }

        return [ $foreignKey, $secondaryKey ];
    }
protected function getKeysForSpecialRelation($specialType, $foreignKey = null)
    {
        switch ($specialType) {

            case static::RELATION_TYPE_FILE:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.files.keys.entry');
                $secondaryKey = config('pxlcms.relations.files.keys.field');
                break;

            case static::RELATION_TYPE_CHECKBOX:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.checkboxes.keys.entry');
                $secondaryKey = config('pxlcms.relations.checkboxes.keys.field');
                break;

            case static::RELATION_TYPE_IMAGE:
            default:
                $foreignKey   = $foreignKey ?: config('pxlcms.relations.images.keys.entry');
                $secondaryKey = config('pxlcms.relations.images.keys.field');
        }

        return [ $foreignKey, $secondaryKey ];
    }
protected function getKeysForSpecialRelation ( $ specialType , $ foreignKey = null ) { switch ( $ specialType ) { case static :: RELATION_TYPE_FILE : $ foreignKey = $ foreignKey ? : config ( 'pxlcms.relations.files.keys.entry' ) ; $ secondaryKey = config ( 'pxlcms.relations.files.keys.field' ) ; break ; case static :: RELATION_TYPE_CHECKBOX : $ foreignKey = $ foreignKey ? : config ( 'pxlcms.relations.checkboxes.keys.entry' ) ; $ secondaryKey = config ( 'pxlcms.relations.checkboxes.keys.field' ) ; break ; case static :: RELATION_TYPE_IMAGE : default : $ foreignKey = $ foreignKey ? : config ( 'pxlcms.relations.images.keys.entry' ) ; $ secondaryKey = config ( 'pxlcms.relations.images.keys.field' ) ; } return [ $ foreignKey , $ secondaryKey ] ; }
Get the foreign and field keys for the special relation's standard CMS model

@param int    $specialType
@param string $foreignKey
@return array    [ foreignKey, secondaryKey ]
Get the foreign and field keys for the special relation s standard CMS model