src/helpers/BaseYii.php
public static function createObject($config, array $params = [], ContainerInterface $container = null)
    {
        return static::get('factory', $container)->create($config, $params);
    }
public static function createObject($config, array $params = [], ContainerInterface $container = null)
    {
        return static::get('factory', $container)->create($config, $params);
    }
public static function createObject ( $ config , array $ params = [ ] , ContainerInterface $ container = null ) { return static :: get ( 'factory' , $ container ) -> create ( $ config , $ params ) ; }
Creates a new object using the given configuration and constructor parameters.

@param string|array|callable $config the object configuration.
@param array $params the constructor parameters.
@param ContainerInterface $container the container, default one will be used if not given.
@return object the created object.
@see \yii\di\Factory::create()
Creates a new object using the given configuration and constructor parameters .