Completed
Push — master ( ecaba6...f0c386 )
by Roman
13s
created

src/Page/ProductController.php (1 issue)

1
<?php
2
3
namespace SilverShop\Page;
4
5
use PageController;
6
use SilverShop\Forms\AddProductForm;
7
use SilverStripe\Core\Injector\Injector;
8
9
class ProductController extends PageController
10
{
11
    private static $allowed_actions = [
12
        'Form',
13
        'AddProductForm',
14
    ];
15
16
    public function Form()
17
    {
18
        $form = Injector::inst()->create($this->getFormClass(), $this, 'Form');
0 ignored issues
show
The method getFormClass() does not exist on SilverShop\Page\ProductController. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $form = Injector::inst()->create($this->/** @scrutinizer ignore-call */ getFormClass(), $this, 'Form');
Loading history...
19
        $this->extend('updateForm', $form);
20
        return $form;
21
    }
22
}
23