<?php
// YourBundle/Admin/EntityAdmin.php
namespace Namespace\YourBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
This file contains 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) | |
{ |
This file contains 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 |
I'm using fresh/DoctrineEnumBundle for managing ENUM fields in database.
-
Create
AbstractBaseFilter.php
<?php
This file contains 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; | |
/** |