Group::createInput

@param array $attributes

@return \O2System\Framework\Libraries\Ui\Components\Form\Elements\Input
15742
public function createInput(array $attributes = [])
    {
        if (isset($attributes[ 'type' ])) {
            switch ($attributes[ 'type' ]) {
                default:
                    $input = new Form\Elements\Input($attributes);
                    break;
                case 'checkbox':
                    $input = new Form\Elements\Checkbox($attributes);
                    break;
                case 'radio':
                    $input = new Form\Elements\Radio($attributes);
                    break;
            }
        } else {
            $input = new Form\Elements\Input($attributes);
        }

        $this->childNodes->push($input);

        return $this->childNodes->last();
    }
158384
public function make(array $attributes = [])
    {
        /** @var Identifiable $model */
        $model = $this->performMake($attributes);
        $this->fill($model, $attributes);
        $this->callAfterListeners('make', [$model]);

        return $model;
    }
788330
public static function make($attributes = [])
    {
        $jobset = new static();

        // make jobset model
        $model = $jobset->makeModel($attributes);
        // update local model
        $jobset->setModel($model);
        // make job models and init job instances
        $jobset->makeJobs();
        // set jobset try at
        $jobsetTryAt = $jobset->getJobsEarliestTryAt();
        $jobset->model->setTryAt($jobsetTryAt);
        $jobset->model->persist();

        return $jobset;
    }
623679
protected function createAndFill(array $attributes)
    {
        $entityClass = static::makes();
        $entity = new $entityClass;

        foreach($attributes as $attribute => $value) {
            $entity->$attribute = $value;
        }

        return $entity;
    }
1012764
public function attributes($attributes) {
        
        if(false === is_array($attributes)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($attributes)), E_USER_ERROR);
        }

        $this -> attributes = array_merge($this -> attributes, $attributes);

        return $this;
    }
688106
public function setAttributes($attributes)
    {
        if (! is_array($attributes)) {
            $attributes = [$attributes];
        }

        $this->attributes = $attributes;

        return $this;
    }
413297
public function make(array $attributes=[])
    {
        $model = $this->getModel()->newInstance($attributes);
        $this->fire($this->event('make'), [$model]);
        return $model;
    }
652847
public function newModelInstance($attributes = [])
    {
        return \tap(parent::newModelInstance($attributes), function ($model) {
            $model->setTenantor($this->tenantor);
        });
    }
189228
public function make(array $attributes = [])
    {
        $instance = $this->related->newInstance($attributes);
        $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey());
        return $instance;
    }
63447
public function newFromBuilder($attributes = array())
    {
        $m = $this->mapData((array) $attributes)->newInstance(array(), true);
        $m->setRawAttributes((array) $attributes, true);
        return $m;
    }
827246
public function firstOrCreate( array $attributes )
	{
		if ( !is_null( $instance = $this->where( $attributes )->first() ) )
			return $instance;

		$instance = $this->model->newInstance( $attributes );

		$instance->save();

		return $instance;
	}
580382
public static function create(array $attributes = [])
    {
        $user = new static($attributes);

        $user->setPassword($attributes['password']);

        $user->save();

        return $user;
    }
491708
public static function init(array $attributes) {
        $obj = new Attributes;
        foreach ($attributes as $attribute) {
            $obj->{$attribute->key} = $attribute;
        }
        return $obj;
    }
434629
public function create(array $attributes)
    {
        $folder = new Folder($attributes);

        $folder->validateRequired();

        $folder->setAttribute('container', array_reverse($folder->getAttribute('container')));

        $add = [];

        $add['objectClass'] = 'organizationalUnit';
        $add['OU'] = $folder->getAttribute('ou_name');

        $containers = 'OU='.implode(',OU=', $folder->getAttribute('container'));

        $dn = 'OU='.$add['OU'].', '.$containers.$this->adldap->getBaseDn();

        return $this->connection->add($dn, $add);
    }
385079
public function make(array $attributes = [])
    {
        $model = $this->model->newInstance($attributes);
        $this->publish('made', $model);

        return $model;
    }
1333371
public function createTextarea(array $attributes = [])
    {
        $this->childNodes->push(new Form\Elements\Textarea($attributes));

        return $this->childNodes->last();
    }
290378
public function createElement(array $attributes)
    {
        $meta = $this->ownerDocument->createElement('meta');

        $name = null;
        foreach ($attributes as $key => $value) {
            $meta->setAttribute($key, $value);
        }

        $this[] = $meta;

        return $meta;
    }