تقنية المعلومات

Symfony Tools

Symfony Tools Symfony http://symfony.com/doc/2.4/index.html Composer https://getcomposer.org/doc/03-cli.md Doctrine http://docs.doctrine-project.org/en/latest/ MySql https://dev.mysql.com/doc/

Validate propery depending on other property

use Symfony\Component\Validator\Constraints as Assert; class Conference { /** * @var \DateTime * * @Assert\Expression( * "this.startDate <= this.endDate", * message="Start date should be less or equal to end date!" * ) */ protected $startDate; /** * @var \DateTime * * @Assert\Expression( * "this.endDate >= this.startDate", * message="End date should be greater or equal to start date!" * ) */ protected $endDate; }

Symfony From Select input

use Acme\YourBundle\Entity\Usertype; class LoginForm extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder->add('usertype', 'entity', array( 'class' => 'AcmeYourBundle:Usertype' 'label' => 'User Type', ) ); } }