dev-master
9999999-dev https://github.com/skonsoft/SkonsoftCvEditorBundleSymfony2 Cv editor bundle
The Requires
- php >=5.3.3
- symfony/framework-bundle 2.1.*
by Skander MABROUK
cv curriculum vitae text kernel grh human ressource
Symfony2 Cv editor bundle
This version of the bundle requires Symfony 2.1., (*1)
If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config:, (*2)
# app/config/config.yml framework: translator: { fallback: en }
For more information about translations, check Symfony documentation., (*3)
Installation is a quick 4 steps process:, (*4)
The preferred way to install this bundle is to rely on Composer.
Just check on Packagist the version you want to install (in the following example, we used "dev-master") and add it to your composer.json
:, (*5)
``` js { "require": { // ... "skonsoft/cv-editor-bundle": "dev-master" } }, (*6)
### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Skonsoft\Bundle\CvEditorBundle\SkonsoftCvEditorBundle(), ); }
This bundle needs a service provider that parses doc and pdf cv into our model (Profile)., (*7)
SkonsoftCvEditorBundle comes with a default service provider: the TextKernelProvider which connect to TextKernel to parse the CV., (*8)
So, if you want to use the default TextKernelProvider, you should have a valid account in TextKernel. Otherwise, you should implement your own provider. See Section Custom Provider for more information., (*9)
To specify your provider, just add it to config.yml, (*10)
#app/config/config.yml #the provider to use skonsoft_cv_editor: provider_service_id: skonsoft_cv_editor.textkernel_provider
If you have a valid TextKernel Provider, you should add your authentication parameters in config.yml. So, your config.yml should look like:, (*11)
#the provider to use skonsoft_cv_editor: provider_service_id: skonsoft_cv_editor.textkernel_provider parameters: skonsoft_cv_editor.textkernel_provider.username: Text_kernel_username skonsoft_cv_editor.textkernel_provider.password: Text_kernel_password skonsoft_cv_editor.textkernel_provider.account: Text_kernel_account
Now, just update your database:, (*12)
./app/console doctrine:schema:update --force
Now, you can browse, the CVs using: cv/profile/ to list all cv profiles, you can add, upload and edit cvs., (*13)
it is very simple, just create a new Class that extends Skonsoft\Bundle\CvEditorBundle\Provider\BaseProvider, (*14)
your own new provider, should implement the inherited abstract method:, (*15)
/** * loads a document into CvProfile object * * @param string $document the path of document to load (doc, pdf) * @return Skonsoft\Bundle\CvEditorBundle\Entity\CvProfile */ public function load($document){ // your logic here to parse the document and return a profile object (Skonsoft\Bundle\CvEditorBundle\Entity\CvProfile) }
For more information, take a look at Skonsoft\Bundle\CvEditorBundle\Provider\TextKernelProvider how it was implemented., (*16)
Now, your new provider class is ready to use, so just you need to inform the controller to use it by declaring it as a service., (*17)
After that, just replace the default service by the new:, (*18)
#app/config/config.yml #the provider to use skonsoft_cv_editor: provider_service_id: skonsoft_cv_editor.custom_provider # the new created service
Now, try it !, (*19)
Symfony2 Cv editor bundle
cv curriculum vitae text kernel grh human ressource