dev-master
9999999-dev https://github.com/caxy/AnnotationBundleImplementation of Annotator(http://okfnlabs.org/annotator/)
MIT
The Requires
by James Grindstaff
annotation annotator
Implementation of Annotator(http://okfnlabs.org/annotator/)
Implementation of Annotator (http://okfnlabs.org/annotator/), (*1)
This version of the bundle requires Symfony 2.2, jQuery, and Doctrine., (*2)
Add CaxyAnnotationBundle in your composer.json:, (*3)
{ "require": { "caxy/annotation-bundle": "dev-master" } }
Now tell composer to download the bundle by running the command:, (*4)
``` bash $ php composer.phar update caxy/annotation-bundle, (*5)
Composer will install the bundle to your project's `vendor/caxy` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Caxy\AnnotationBundle\CaxyAnnotationBundle(), ); }
app/config/caxy/annotation.yml, (*6)
``` yaml caxy_annotation: selector: ".annotation" plugins: ['store'], (*7)
* plugins is optional and currently only the store plugin is supported ### Step 4: Import CaxyAnnotationBundle routing files Import the config file for the annotation ``` yaml # app/config/config.yml - { resource: caxy/annotation.yml }
Next import the CaxyAnnotationBundle routing files., (*8)
In YAML:, (*9)
``` yaml, (*10)
caxy_annotation: resource: "@CaxyAnnotationBundle/Resources/config/routing/routing.yml", (*11)
### Step 5: Update your database schema * Updating your schema is only needed if you are using the store plugin. If you aren't, skip to Step 6. Now that the bundle is configured, the last thing you need to do is update your database schema. For ORM run the following command. ``` bash $ php app/console doctrine:schema:update --force
Now that the CaxyAnnotationBundle is activated and configured, you can use it by adding the following to any twig view:, (*12)
php
{{ annotation_init() }}
, (*13)
And add an html container with the selector added to the config in Step 3 ex:, (*14)
Implementation of Annotator(http://okfnlabs.org/annotator/)
MIT
annotation annotator