base/ExtensionHelperTrait.php
public static function getModel($class)
    {
        if ($class instanceof \rhoone\extension\Extension) {
            $class = $class->className();
        }
        if (is_string($class)) {
            return \rhoone\models\Extension::find()->where(['classname' => static::normalizeClass($class)])->one();
        }
        if ($class instanceof \rhoone\models\Extension) {
            return \rhoone\models\Extension::find()->guid($class->guid)->one();
        }
        return null;
    }
public static function getModel($class)
    {
        if ($class instanceof \rhoone\extension\Extension) {
            $class = $class->className();
        }
        if (is_string($class)) {
            return \rhoone\models\Extension::find()->where(['classname' => static::normalizeClass($class)])->one();
        }
        if ($class instanceof \rhoone\models\Extension) {
            return \rhoone\models\Extension::find()->guid($class->guid)->one();
        }
        return null;
    }
public static function getModel ( $ class ) { if ( $ class instanceof \ rhoone \ extension \ Extension ) { $ class = $ class -> className ( ) ; } if ( is_string ( $ class ) ) { return \ rhoone \ models \ Extension :: find ( ) -> where ( [ 'classname' => static :: normalizeClass ( $ class ) ] ) -> one ( ) ; } if ( $ class instanceof \ rhoone \ models \ Extension ) { return \ rhoone \ models \ Extension :: find ( ) -> guid ( $ class -> guid ) -> one ( ) ; } return null ; }
Get extension model.
@param string|\rhoone\extension\Extension|\rhoone\models\Extension $class
@return \rhoone\models\Extension
Get extension model .