(Grav GitSync) Automatic Commit from smokephil

This commit is contained in:
smokephil 2024-03-22 22:42:22 +01:00 committed by GitSync
commit 4267db646d
2765 changed files with 462171 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<?php declare(strict_types=1);
namespace Grav\Plugin\Form;
use Grav\Common\Page\Interfaces\PageInterface;
use Grav\Common\Page\Page;
use Grav\Framework\Form\Interfaces\FormFactoryInterface;
use Grav\Framework\Form\Interfaces\FormInterface;
class FormFactory implements FormFactoryInterface
{
/**
* Create form using the header of the page.
*
* @param Page $page
* @param string $name
* @param array $form
* @return Form|null
* @deprecated 1.6 Use FormFactory::createFormByPage() instead.
*/
public function createPageForm(Page $page, string $name, array $form): ?FormInterface
{
return new Form($page, $name, $form);
}
/**
* Create form using the header of the page.
*
* @param PageInterface $page
* @param string $name
* @param array $form
* @return Form|null
*/
public function createFormForPage(PageInterface $page, string $name, array $form): ?FormInterface
{
return new Form($page, $name, $form);
}
}