public static function getAncestorModels($ancestor)
    {
        if (empty($ancestor) || !is_array($ancestor)) {
            return [];
        }
        $models = [];
        foreach ($ancestor as $self) {
            $models[] = static::findOne($self);
        }
        return $models;
    }
public static function getAncestorModels($ancestor)
    {
        if (empty($ancestor) || !is_array($ancestor)) {
            return [];
        }
        $models = [];
        foreach ($ancestor as $self) {
            $models[] = static::findOne($self);
        }
        return $models;
    }
public static function getAncestorModels ( $ ancestor ) { if ( empty ( $ ancestor ) || ! is_array ( $ ancestor ) ) { return [ ] ; } $ models = [ ] ; foreach ( $ ancestor as $ self ) { $ models [ ] = static :: findOne ( $ self ) ; } return $ models ; }
Get ancestors with specified ancestor chain.
@param string[] $ancestor Ancestor chain.
@return static[]|null
Get ancestors with specified ancestor chain .