src/ngrest/ConfigBuilder.php
public function load($objectType)
    {
        if ($this->pointer !== 'aw') {
            throw new Exception('Register method can only be used in a pointer context.');
        }
        
        $object = Yii::createObject($objectType);
        
        if (is_string($objectType)) {
            $config['class'] = $objectType;
        } else {
            $config = $objectType;
        }
        
        $config['ngRestModelClass'] = $this->ngRestModelClass;
        
        $this->config[$this->pointer][$object->getHashName()] = [
            'objectConfig' => $config,
            'label' => $object->getLabel(),
            'icon' => $object->getIcon(),
        ];
        
        return $this;
    }
public function load($objectType)
    {
        if ($this->pointer !== 'aw') {
            throw new Exception('Register method can only be used in a pointer context.');
        }
        
        $object = Yii::createObject($objectType);
        
        if (is_string($objectType)) {
            $config['class'] = $objectType;
        } else {
            $config = $objectType;
        }
        
        $config['ngRestModelClass'] = $this->ngRestModelClass;
        
        $this->config[$this->pointer][$object->getHashName()] = [
            'objectConfig' => $config,
            'label' => $object->getLabel(),
            'icon' => $object->getIcon(),
        ];
        
        return $this;
    }
public function load ( $ objectType ) { if ( $ this -> pointer !== 'aw' ) { throw new Exception ( 'Register method can only be used in a pointer context.' ) ; } $ object = Yii :: createObject ( $ objectType ) ; if ( is_string ( $ objectType ) ) { $ config [ 'class' ] = $ objectType ; } else { $ config = $ objectType ; } $ config [ 'ngRestModelClass' ] = $ this -> ngRestModelClass ; $ this -> config [ $ this -> pointer ] [ $ object -> getHashName ( ) ] = [ 'objectConfig' => $ config , 'label' => $ object -> getLabel ( ) , 'icon' => $ object -> getIcon ( ) , ] ; return $ this ; }
Creates a new active window object using the given configuration.

Below are some usage examples:

```php
// create an object using a class name
load('app\modules\foobar\test\MyActiveWindow');

// create an object using a configuration array
load([
'class' => 'app\modules\foobar\test\MyActiveWindow',
'property1' => 'value for property 1'
]);

```

@param string|array $objectType the object type. This can be specified in one of the following forms:
+ a string: representing the class name of the object to be created
+ a configuration array: the array must contain a `class` element which is treated as the object class,
and the rest of the name-value pairs will be used to initialize the corresponding object properties
@return $this
@throws Exception
@since 1.0.0
Creates a new active window object using the given configuration .