mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
remove dump statement
This commit is contained in:
parent
e4b4483845
commit
7b8d22a486
@ -64,28 +64,11 @@ class ExportType extends AbstractType
|
|||||||
$exportOptions = array(
|
$exportOptions = array(
|
||||||
'compound' => true,
|
'compound' => true,
|
||||||
'constraints' => array(
|
'constraints' => array(
|
||||||
//new \Chill\MainBundle\Validator\Constraints\Export\ExportElementConstraint()
|
|
||||||
// new Assert\Callback(array(
|
|
||||||
// 'callback' => function($data, ExecutionContextInterface $context, $payload) use ($export) {
|
|
||||||
// dump('i call back');
|
|
||||||
// }
|
|
||||||
// ))
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// add a contraint if required by export
|
// add a contraint if required by export
|
||||||
/*if ($export instanceof ExportElementWithValidationInterface) {
|
|
||||||
dump('export instance of export element with validation');
|
|
||||||
$exportOptions = array_merge($exportOptions, array(
|
|
||||||
'constraints' => [new Assert\Callback([
|
|
||||||
'callback' => function($data, ExecutionContextInterface $context, $payload) use ($export) {
|
|
||||||
dump('i will execute callback');
|
|
||||||
$export->validateForm($data[self::EXPORT_KEY], $context);
|
|
||||||
}
|
|
||||||
])],
|
|
||||||
'cascade_validation' => true
|
|
||||||
));
|
|
||||||
} */;
|
|
||||||
$exportBuilder = $builder->create(self::EXPORT_KEY/*, FormType::class, $exportOptions*/);
|
$exportBuilder = $builder->create(self::EXPORT_KEY/*, FormType::class, $exportOptions*/);
|
||||||
|
|
||||||
$export->buildForm($exportBuilder);
|
$export->buildForm($exportBuilder);
|
||||||
|
@ -79,7 +79,14 @@ class TranslatableStringHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no fallback translation... trying the first available
|
||||||
|
$langs = array_keys($translatableStrings);
|
||||||
|
|
||||||
|
if (count($langs) === 0) {
|
||||||
return '';
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $translatableStrings[$langs[0]];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ class AbstractSearchTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testParseDateRegular()
|
public function testParseDateRegular()
|
||||||
{
|
{
|
||||||
|
|
||||||
//var_dump($this->stub);
|
|
||||||
$date = $this->stub->parseDate('2014-05-01');
|
$date = $this->stub->parseDate('2014-05-01');
|
||||||
|
|
||||||
$this->assertEquals('2014', $date->format('Y'));
|
$this->assertEquals('2014', $date->format('Y'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user