Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update guesser

  • Loading branch information...
commit d49e569a0ae63e3318bb2dacb223e45495db87f0 1 parent 6b3f2c3
Stanislav Turza authored
Showing with 35 additions and 41 deletions.
  1. +35 −41 Form/GridTypeGuesser.php
View
76 Form/GridTypeGuesser.php
@@ -1,14 +1,4 @@
<?php
-
-/*
- * This file is part of the DataGridBundle.
- *
- * (c) Stanislav Turza <sorien@mail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
namespace Sorien\DataGridBundle\Form;
use Symfony\Component\Form\FormTypeGuesserInterface;
@@ -18,26 +8,26 @@
class GridTypeGuesser implements FormTypeGuesserInterface
{
- /**
- * @var \Sorien\DataGridBundle\Grid\Mapping\Metadata\Manager;
- */
- private $manager;
+ /**
+ * @var \Sorien\DataGridBundle\Grid\Mapping\Metadata\Manager;
+ */
+ private $manager;
- /**
- * @var \Sorien\DataGridBundle\Grid\Mapping\Metadata\Metadata
- */
- private $metadata;
+ /**
+ * @var \Sorien\DataGridBundle\Grid\Mapping\Metadata\Metadata
+ */
+ private $metadata;
- /**
- * @param $manager
- */
- public function __construct($manager)
- {
- $this->manager = $manager;
- }
+ /**
+ * @param $manager
+ */
+ public function __construct($manager)
+ {
+ $this->manager = $manager;
+ }
- public function guessType($class, $property)
- {
+ public function guessType($class, $property)
+ {
$metadata = $this->manager->getMetadata($class);
if ($metadata->hasFieldMapping($property))
@@ -64,22 +54,26 @@ public function guessType($class, $property)
return null;
}
}
- }
+ }
+
+ public function guessRequired($class, $property)
+ {
+ }
- public function guessRequired($class, $property)
- {
- }
+ public function guessMaxLength($class, $property)
+ {
+ }
- public function guessMaxLength($class, $property)
- {
- }
+ public function guessMinLength($class, $property)
+ {
+ }
- public function guessMinLength($class, $property)
- {
- }
+ public function guessPattern($class, $property)
+ {
+ }
- protected function isMappedClass($class)
- {
- return ;
- }
+ protected function isMappedClass($class)
+ {
+ return ;
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.