0
當我訪問我的瀏覽器,這是我所得到的:Symfony2的致命錯誤
Fatal error: Declaration of Ecs\CrmBundle\Form\Parts\DepartmentSelectionType::getDefaultOptions() must be compatible with Symfony\Component\Form\FormTypeInterface::getDefaultOptions() in C:\wamp\www\crm\src\Ecs\CrmBundle\Form\Parts\DepartmentSelectionType.php on line 41
而且它被引用的文件中,有如下發現:
<?php
namespace Ecs\CrmBundle\Form\Parts;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class DepartmentSelectionType extends AbstractType {
private $canSeeAll = false;
public function __construct($canSeeAll = false)
{
$this->canSeeAll = $canSeeAll;
}
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('department', 'entity',
array(
'class' => "EcsAgentManagerBundle:EmployeeDepartment",
'required' => false,
'multiple' => true,
'expanded' => true,
'label' => "Department"))
;
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'Ecs\AgentManagerBundle\Entity\EmployeeDepartment',
);
}
public function getName()
{
return 'ecs_crmbundle_departmentselectiontype';
}
}
是文件它正在引用......關於這個問題可能有什麼想法?