for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class DMSDocumentRequestForm extends Form
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function __construct(Controller $controller, $name, FieldList $fields, FieldList $actions, $validator = null)
$requiredFields = array(
'ReceiverName',
'ReceiverPhone',
'ReceiverEmail',
'DeliveryAddressLine1',
'DeliveryAddressCountry',
'DeliveryAddressPostCode',
);
foreach ($fields as $field) {
if (in_array($field->name, $requiredFields)) {
$field->addExtraClass('requiredField');
}
$validator = new RequiredFields($requiredFields);
$actions->push(new FormAction('doRequestSend', 'Send your request'));
parent::__construct($controller, $name, $fields, $actions, $validator);
public function forTemplate()
return $this->renderWith(array($this->class));
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.