<?php
namespace AcmeBundle\Admin\Filter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Service; | |
use Symfony\Bundle\FrameworkBundle\Routing\Router; | |
use Symfony\Component\Filesystem\Filesystem; | |
use Symfony\Component\Finder\Finder; | |
use Symfony\Component\HttpFoundation\File\File; | |
/** |
I'm using fresh/DoctrineEnumBundle for managing ENUM fields in database.
-
Create
AbstractBaseFilter.php
<?php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Google translate | |
* | |
* @param string $from From language | |
* @param string $to To language | |
* @param string $text Word to translate | |
* | |
* @return string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recursive deleting fields by pattern | |
* | |
* @param array $array Haystack | |
* @param array $pattern Pattern | |
*/ | |
public function deleteFields(&$array, $pattern) | |
{ |