caxy
Implementation of Annotator(http://okfnlabs.org/annotator/)
Implementation of Annotator (http://okfnlabs.org/annotator/)
This version of the bundle requires Symfony 2.2, jQuery, and Doctrine.
Add CaxyAnnotationBundle in your composer.json:
{
"require": {
"caxy/annotation-bundle": "dev-master"
}
}
Now tell composer to download the bundle by running the command:
$ php composer.phar update caxy/annotation-bundle
Composer will install the bundle to your project's vendor/caxy
directory.
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Caxy\AnnotationBundle\CaxyAnnotationBundle(),
);
}
app/config/caxy/annotation.yml
caxy_annotation:
selector: ".annotation"
plugins: ['store']
Import the config file for the annotation
# app/config/config.yml
- { resource: caxy/annotation.yml }
Next import the CaxyAnnotationBundle routing files.
In YAML:
# app/config/routing.yml
caxy_annotation:
resource: "@CaxyAnnotationBundle/Resources/config/routing/routing.yml"
Now that the bundle is configured, the last thing you need to do is update your database schema.
For ORM run the following command.
$ 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:
{{ annotation_init() }}
And add an html container with the selector added to the config in Step 3 ex: