Download the PHP package vladislavs/content-bundle without Composer

On this page you can find all versions of the php package vladislavs/content-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package content-bundle

README

Build Status Latest Stable Version Total Downloads

License here.

What is Arcana Content Bundle?

Arcana Content Bundle allows administrators to edit texts directly in the page, not some separate Admin section.

Requirements

Installation

Bundle can be installed via Composer. You can find this bundle on packagist: https://packagist.org/packages/arcanacode/content-bundle


// composer.json
{
    // ...
    require: {
        // ..
        "arcanacode/content-bundle": "dev-master"

    }
}

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:


    php composer.phar update

You have to add this bundle to AppKernel.php register bundles method, so that Symfony can use it.

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Arcana\Bundle\ContentBundle\ArcanaContentBundle(),
);

In your config.yml you must add this bundle to jms_di_extra.

jms_di_extra:
    locations:
        bundles: [ ArcanaContentBundle ]

Next add bundle to the 'app/config/routing.yml' file.

arcana_content:
    resource: "@ArcanaContentBundle/Controller/"
    type:     annotation

In base template file include stylesheets and javascripts for only users with ROLE_ADMIN

{% if is_granted('ROLE_ADMIN') %}
    {% stylesheets filter="cssrewrite"
        "bundles/arcanacontent/vendor/raptor/raptor-custom-front-end.min.css"
    %}
        
    {% endstylesheets %}
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
    {% javascripts
        "bundles/arcanacontent/vendor/raptor/raptor.custom.min.js"
        "bundles/arcanacontent/js/manager.js"
    %}
        
    {% endjavascripts %}

    
{% endif %}

Put somewhere in your base template

window.arcana_content_manager.contentSaveUrl = '{{ path('arcana_content_save') }}';

In your security.yml file restrict access for arcana_content_save path only to administrators.

access_control:
    //..
    - { path: ^/save, roles: ROLE_ADMIN }

Finally run app/console doctrine:schema:update --force to create 'content' table in your database.

Usage

In order to use the bundle, all texts you want to be able to edit, must be added to template with content filter in such format:

{{ 'default value' | content('name', {options}) }}

'default value' is the default text, that will appear if no content is found in database. 'name' is the name of content in the content table. 'options' - array of options (listed below). Example:

{{ 'Welcome to the Arcana Content Bundle!' | content('default_page_title', { editable_separately: true, type: 'plaintext' }) }}

You can also use large text blocks (also with html tags) without using a default value, for example:


{% content of "facts_text" %}

            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc rhoncus massa et dui tempor facilisis. In a luctus erat. Morbi eget tellus fermentum, pretium arcu sed, congue arcu. 

{% endcontent %}

Separately editable texts

{{ 'You can edit me separately' | content('separate_title_tag', { editable_separately: true, type: 'plaintext' }) }}

Separately editable texts are texts, that are not visible on the page, for example "title" tag. You can edit them by opening "Separately editable contents" popup.

Options available: 'editable_separately' - if 'true', will be editable in separately editable contents popup 'type': 'plaintext'/'block'/'inline'/'anchor' - NEED DESCRIPTION

Contributing

Pull requests are welcome.

Description here.

Running Symfony2 Tests

Description here.


All versions of content-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/framework-bundle Version ~2.4
sensio/framework-extra-bundle Version ~3.0
doctrine/orm Version ~2.2,>=2.2.3
jms/di-extra-bundle Version ~1.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vladislavs/content-bundle contains the following files

Loading the files please wait ....