2017 © Pedro Peláez
 

symfony-bundle sh-cv-editor-bundle

Symfony2 Cv editor bundle

image

shubaivan/sh-cv-editor-bundle

Symfony2 Cv editor bundle

  • Monday, June 8, 2015
  • by shuba
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Getting Started With SkonsoftCvEditorBundle

Prerequisites

This version of the bundle requires Symfony 2.1., (*1)

Translations

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

Installation is a quick 4 steps process:, (*4)

  1. Download SkonsoftCvEditorBundle
  2. Enable the Bundle
  3. Configure your application's config.yml
  4. Update your database

Step 1: Install SkonsoftCvEditorBundle

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(), ); }

Step 3: Configure your config.yml

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)

Step 3: Update your database

./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)

Building Custom provider,

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)

The Versions

08/06 2015

dev-master

9999999-dev https://github.com/shubaivan/SkonsoftCvEditorBundle

Symfony2 Cv editor bundle

  Sources   Download

The Requires

 

by ShubaIvan

cv curriculum vitae text kernel grh human ressource