@param ObjectStateGroupUpdateData|null $data
@param null|string $name

@return FormInterface
185384
public function updateObjectStateGroup(
        ObjectStateGroupUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-object-state-group-%d', $data->getObjectStateGroup()->id);

        return $this->formFactory->createNamed($name, ObjectStateGroupUpdateType::class, $data);
    }
329005
public function deleteTrashItem(
        TrashItemDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(TrashItemDeleteType::class);

        return $this->formFactory->createNamed($name, TrashItemDeleteType::class, $data);
    }
1329130
public function render($name, array $data = [])
    {
        if (!isset($this->response)) {
            throw new \LogicException(
                sprintf('Invalid %s object instance', ResponseInterface::class)
            );
        }

        return $this->response->write($this->plates->render($name, $data));
    }
1354240
public function removeContentDraft(
        ContentRemoveData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ContentRemoveType::class);

        return $this->formFactory->createNamed($name, ContentRemoveType::class, $data);
    }
975446
public function createPolicyWithLimitation(
        ?PolicyCreateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(PolicyCreateWithLimitationType::class);

        return $this->formFactory->createNamed($name, PolicyCreateWithLimitationType::class, $data);
    }
1289965
public static function extend($name, $data = null)
    {
        return self::$view->call($name, $data)->show();
    }
1141994
public function updateContentMainLocation(
        ?ContentMainLocationUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ContentMainLocationUpdateType::class);
        $data = $data ?? new ContentMainLocationUpdateData();

        return $this->formFactory->createNamed(
            $name,
            ContentMainLocationUpdateType::class,
            $data
        );
    }
1128991
public function group($name, $data = [])
    {
        $app = 'App\Groups\\'.ucwords($name);
        $core = 'Scara\Http\Groups\\'.ucwords($name);

        if (class_exists($app)) {
            $class = new $app();
        } else {
            if (class_exists($core)) {
                $class = new $core();
            } else {
                throw new \Exception("$name group could not be found in the application or in Scara's core");
            }
        }

        if (method_exists($class, 'init')) {
            if (!empty($data)) {
                $class->init($data);
            } else {
                $class->init();
            }

            if (in_array('Scara\Http\Groups\Groupable', class_uses($class))) {
                // class uses Groupable trait. call finalize
                $class->finalize();
            } elseif (method_exists($class, 'finalize')) {
                $class->finalize(); // not using Groupable trait, but still has a finalize method defined
            }
        } else {
            throw new \Exception("$name group does not define the required init method!");
        }

        return $this;
    }
731550
public function deleteObjectStateGroup(
        ObjectStateGroupDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('delete-object-state-group-%d', $data->getObjectStateGroup()->id);

        return $this->formFactory->createNamed($name, ObjectStateGroupDeleteType::class, $data);
    }
1108597
public function updateUserSetting(
        string $userSettingIdentifier,
        UserSettingUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(UserSettingUpdateType::class);

        return $this->formFactory->createNamed(
            $name,
            UserSettingUpdateType::class,
            $data,
            ['user_setting_identifier' => $userSettingIdentifier]
        );
    }
130198
public function assignContentSectionForm(
        SectionContentAssignData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(SectionContentAssignType::class);

        return $this->formFactory->createNamed($name, SectionContentAssignType::class, $data);
    }
440104
public function render($name, $data = null)
  {
    $t = $this->template($name, $data);

    return $t->render();
  }
115759
public function createRoleAssignment(
        ?RoleAssignmentCreateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(RoleAssignmentCreateType::class);

        return $this->formFactory->createNamed(
            $name,
            RoleAssignmentCreateType::class,
            $data ?? new RoleAssignmentCreateData()
        );
    }
582815
public function deleteUser(
        UserDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(UserDeleteType::class);

        return $this->formFactory->createNamed($name, UserDeleteType::class, $data);
    }
146197
public function insert($name, array $data=null)
	{
		// Register the template file (to find the custom templates)
		if (!array_key_exists($name, TemplateLoader::getFiles()))
		{
			$objTheme = \LayoutModel::findById(Controller::getLayoutId($this->ptable, $this->pid))->getRelated('pid');
			
			TemplateLoader::addFile($name, $objTheme->templates);
		}
		
		/** @var \Template $tpl */
		if ($this instanceof \Template)
		{
			$tpl = new static($name);
		}
		elseif (TL_MODE == 'BE')
		{
			$tpl = new BackendTemplate($name);
		}
		else
		{
			$tpl = new FrontendTemplate($name);
		}
		if ($data !== null)
		{
			$tpl->setData($data);
		}
		
		echo $tpl->parse();
	}
639685
public function createObjectStateGroup(
        ?ObjectStateGroupCreateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ObjectStateGroupCreateType::class);

        return $this->formFactory->createNamed(
            $name,
            ObjectStateGroupCreateType::class,
            $data ?? new ObjectStateGroupCreateData()
        );
    }
558677
public function createObjectState(
        ?ObjectStateCreateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ObjectStateCreateType::class);

        return $this->formFactory->createNamed(
            $name,
            ObjectStateCreateType::class,
            $data ?? new ObjectStateCreateData()
        );
    }