dev-master
9999999-devSurveyJs Bundle
The Requires
by Grégory DELANNOY
surveyjs bundle questionnaire
0.1
0.1.0.0SurveyJs Bundle
The Requires
by Grégory DELANNOY
surveyjs bundle questionnaire
SurveyJs Bundle
SurveyJsBundle is just an integration of surveyjs library in Symfony 3., (*1)
To start using the bundle, register the bundle in your application's kernel class:, (*2)
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = [ // ... new Grelu\SurveyJsBundle\SurveyJsBundle(), // ... ]; } }
# app/config/routing.yml surveyJs: resource: "@SurveyJsBundle/Controller/" type: annotation
php bin/console doctrine:schema:update --force
php bin/console assets:install
<?php namespace AppBundle\Entity; use Grelu\SurveyJsBundle\Entity\Survey as BaseSurvey; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="survey") */ class Survey extends BaseSurvey { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; }
<?php namespace AppBundle\Entity; use Grelu\SurveyJsBundle\Entity\DataSurvey as BaseDataSurvey; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="data_survey") */ class DataSurvey extends BaseDataSurvey { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; }
# SurveyJsBundle config survey_js: survey_class: AppBundle\Entity\Survey data_survey_class: AppBundle\Entity\DataSurvey
survey_index GET ANY ANY /survey/
survey_new_edit GET|POST ANY ANY /survey/edit/{id}
survey_save POST ANY ANY /survey/save
survey_show GET ANY ANY /survey/show/{id}/number/{number}
survey_data_save POST ANY ANY /survey/data-save, (*3)
Enjoy!, (*4)
SurveyJs Bundle
surveyjs bundle questionnaire
SurveyJs Bundle
surveyjs bundle questionnaire