src/propertyStorage/AbstractPropertyStorage.php
protected static function getApplicablePropertyModelClassNames($id)
    {
        if (isset(static::$applicablePropertyModelClassNames[$id]) === false) {
            $subQuery = PropertyPropertyGroup::find()
                ->from(PropertyPropertyGroup::tableName() . ' ppg')
                ->select('pg.applicable_property_model_id')
                ->join('INNER JOIN', PropertyGroup::tableName() . ' pg', 'pg.id = ppg.property_group_id')
                ->where(['ppg.property_id' => $id])
                ->createCommand()->getRawSql();
            static::$applicablePropertyModelClassNames[$id] = (new Query())
                ->select('class_name')
                ->from(ApplicablePropertyModels::tableName())
                ->where('id IN (' . $subQuery . ')')->column();
        }
        return static::$applicablePropertyModelClassNames[$id];
    }
protected static function getApplicablePropertyModelClassNames($id)
    {
        if (isset(static::$applicablePropertyModelClassNames[$id]) === false) {
            $subQuery = PropertyPropertyGroup::find()
                ->from(PropertyPropertyGroup::tableName() . ' ppg')
                ->select('pg.applicable_property_model_id')
                ->join('INNER JOIN', PropertyGroup::tableName() . ' pg', 'pg.id = ppg.property_group_id')
                ->where(['ppg.property_id' => $id])
                ->createCommand()->getRawSql();
            static::$applicablePropertyModelClassNames[$id] = (new Query())
                ->select('class_name')
                ->from(ApplicablePropertyModels::tableName())
                ->where('id IN (' . $subQuery . ')')->column();
        }
        return static::$applicablePropertyModelClassNames[$id];
    }
protected static function getApplicablePropertyModelClassNames ( $ id ) { if ( isset ( static :: $ applicablePropertyModelClassNames [ $ id ] ) === false ) { $ subQuery = PropertyPropertyGroup :: find ( ) -> from ( PropertyPropertyGroup :: tableName ( ) . ' ppg' ) -> select ( 'pg.applicable_property_model_id' ) -> join ( 'INNER JOIN' , PropertyGroup :: tableName ( ) . ' pg' , 'pg.id = ppg.property_group_id' ) -> where ( [ 'ppg.property_id' => $ id ] ) -> createCommand ( ) -> getRawSql ( ) ; static :: $ applicablePropertyModelClassNames [ $ id ] = ( new Query ( ) ) -> select ( 'class_name' ) -> from ( ApplicablePropertyModels :: tableName ( ) ) -> where ( 'id IN (' . $ subQuery . ')' ) -> column ( ) ; } return static :: $ applicablePropertyModelClassNames [ $ id ] ; }
Get applicable property model class names by property id.
@param int $id
@return ActiveRecord[] | HasProperties[] | PropertiesTrait[]
Get applicable property model class names by property id .