@param Config $data

@return \Symfony\Component\Form\Form
498392
protected function createDeleteForm(Config $data)
    {
        $form = $this->createForm(DeleteFormType::class, $data, [
            'action'  => $this->generateUrl('integrated_channel_config_delete', ['id' => $data->getName()]),
            'method'  => 'DELETE',
        ]);

        $form->add('actions', ActionsType::class, ['buttons' => ['delete', 'cancel']]);

        return $form;
    }
899070
public function create($data)
    {
        $data = new AnConfig($data);

        $data->append(array(
            'owner' => $data->target ? $data->target : $data->subject,
        ));

        $data = AnConfig::unbox($data);

        return $this->getEntity(array('data' => $data));
    }
191657
public function createForm($name, $type = "form", array $data = array(), array $options = array())
    {
        if (empty($name)) {
            $name = static::EMPTY_FORM_NAME;
        }

        return $this->getTheliaFormFactory()->createForm($name, $type, $data, $options);
    }
1129230
public function generateForm(array $data)
	{
		/** @var Form $form */
		$form = new $this->formClass;

		if (array_key_exists('attributes', $data))
		{
			$form->setAttributes($data['attributes']);
		}

		if (array_key_exists('content', $data))
		{
			$content = $this->generate($data['content']);
			$form->setContents($content);
		}

		return $form;
	}
1041946
public function config($config)
    {
        if (is_array($config)) {
            $this->config = array_merge($this->config, $config);
        } elseif (isset($this->config[$config])) {
            return $this->config[$config];
        } else {
            return;
        }
    }
627025
public static function createWithConfig(array $config = []) {
        $plates = new self();

        $plates->register(new PlatesExtension());
        $plates->register(new Extension\Data\DataExtension());
        $plates->register(new Extension\Path\PathExtension());
        $plates->register(new Extension\RenderContext\RenderContextExtension());
        $plates->register(new Extension\LayoutSections\LayoutSectionsExtension());
        $plates->register(new Extension\Folders\FoldersExtension());

        $plates->addConfig($config);

        return $plates;
    }
361157
protected function createDataColumnByConfig(array $config = [])
    {
        return Yii::createObject(array_merge([
            'class' => $this->dataColumnClass ?: \yii\grid\DataColumn::class,
            'grid'  => $this,
        ], $config));
    }
149412
public function setConfig(Config $config)
    {
        parent::setConfig($config);

        $this->command->setConfig($config);

        return $this;
    }
772173
public function createForm($data = null, array $options = [])
    {
        return $this->formFactory->create(NodeFormType::class, $data, $options);
    }
148817
public function make($data)
    {
        $parts = $this->splitData($data['data'], ['meta', 'body']);

        $meta = self::parseYaml($parts['meta']);

        return $this->createAndFill([
            'id'     => $data['id'],
            'title'  => $meta['title'],
            'date'   => $data['date'],
            'data'   => isset($meta['data']) ? $meta['data'] : [],
            'body'   => $parts['body'],
        ]);
    }
489922
public function config($data)
    {
        $items = is_array($data) ? $data : array();

        $config = new Provider\Configuration($items);

        if (is_string($data))
        {
            $config->load($data);
        }

        $interface = ProviderInterface::CONFIG;

        return $this->set($interface, $config);
    }
229211
public function setConfig($config)
    {
        $this->config = $config;

        $this->routes = $config['routes'];
        $this->options = $config['options'];

        return $this;
    }
817736
public function renderForm( $config = [], $html = [] ) {

		$formView = CodeGenUtil::isAbsolutePath( $this->formView, true ) ? $this->formView : "$this->template/$this->formView";

		return $this->render( $formView, [
			'widget' => $this,
			'infoHtml' => $html[ 'infoHtml' ],
			'fieldsHtml' => $html[ 'fieldsHtml' ]
		] );
	}
655589
protected function convertToCsvable(array $data, array $config): Collection
    {
        $uses = $config['uses'] ?? 'data';
        $content = $data[$uses] ?? [];

        if (! $content instanceof Csvable) {
            if ($content instanceof Arrayable) {
                $content = $content->toArray();
            }

            $content = Collection::make(\array_map([$this, 'transformToArray'], $content));
        }

        return $content;
    }
513196
private function getForm($formConfig)
    {
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $form = $factory->createForm($formConfig);

        return $form;
    }
146975
public function createFromArray($config)
    {
        if (isset($config['viewConfig'])) {
            $this->viewBuilder()->createFromArray($config['viewConfig']);
            unset($config['viewConfig']);
        }

        foreach ($config as $property => $value) {
            $this->{$property} = $value;
        }

        return $this;
    }
61707
public function createFormBuilder($data = null, array $options = array())
    {
        return $this->getContainer()->get('form.factory')->createBuilder('form', $data, $options);
    }