mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
resolving deprecated private service injection on commands classes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\CustomFieldsBundle\Controller;
|
||||
|
||||
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
@@ -24,7 +25,22 @@ use Chill\CustomFieldsBundle\Form\Type\CustomFieldType as FormTypeCustomField;
|
||||
*/
|
||||
class CustomFieldsGroupController extends Controller
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var CustomFieldProvider
|
||||
*/
|
||||
private $customfieldProvider;
|
||||
|
||||
/**
|
||||
* CustomFieldsGroupController constructor.
|
||||
*
|
||||
* @param CustomFieldProvider $customFieldProvider
|
||||
*/
|
||||
public function __construct(CustomFieldProvider $customFieldProvider)
|
||||
{
|
||||
$this->customfieldProvider = $customFieldProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all CustomFieldsGroup entities.
|
||||
*
|
||||
@@ -243,7 +259,7 @@ class CustomFieldsGroupController extends Controller
|
||||
{
|
||||
|
||||
$fieldChoices = array();
|
||||
foreach ($this->get('chill.custom_field.provider')->getAllFields()
|
||||
foreach ($this->customfieldProvider->getAllFields()
|
||||
as $key => $customType) {
|
||||
$fieldChoices[$key] = $customType->getName();
|
||||
}
|
||||
|
Reference in New Issue
Block a user