Download the PHP package artgris/page-bundle without Composer

On this page you can find all versions of the php package artgris/page-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 page-bundle

Artgris Page

Installation:

composer require artgris/page-bundle

php bin/console doctrine:schema:update --force 

Configuration:

in config/packages

configure KnpLabs/DoctrineBehaviors: https://github.com/KnpLabs/DoctrineBehaviors

add a2lix_translation_form.yaml

ex:

add artgris_page.yaml

not required, no minimal configuration

[1] Default form types list:

Usage:

1 - Create a page and add blocks

2 - Edit the content of the blocks

3 - Retrieve a simple block by tag

{{ blok('title') }}

=> return "My website"

use the debugging bar to easily find all blocks by route. (click on block tag to copy/paste code)

Retrieve all blocks of the current page or not linked to a page

bloks()

ex:

{% for blok in bloks() %}
    {{ blok }} <br>
{% endfor %}

Retrieve all blocks by page tag

page('page-tag')

ex:

{% for blok in page('homepage') %}
    {{ blok }} <br>
{% endfor %}

Retrieve blocks with a regular expression

in an array

regex_array_blok('regex-expression')

ex:

{% for blok in regex_array_blok('^sidebar-*') %}
    {{ blok }} <br>
{% endfor %}

implode in a string

regex_blok('regex-expression')

ex:

{{ regex_blok('^sidebar-*') }}  

Tips:

custom block rendering

create a form type that implements PageFromInterface:

namespace App\Form;

use Artgris\Bundle\PageBundle\Form\Type\PageFromInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\OptionsResolver\OptionsResolver;

class CustomType extends AbstractType implements PageFromInterface
{

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'attr' => [
                'class' => 'custom',
            ],
            'required' => false,
        ]);
    }

    public function getParent()
    {
        return TextareaType::class;
    }

    public static function getRenderType($value)
    {
        return $value. '<hr>';
    }
}

Edit the rendering as you wish using the getRenderType method.

Commands

Export database model (no values) in a file ("/pages/model.yaml")

php bin/console artgris:page:export

/pages/model.yaml extract:

Import model ("/pages/model.yaml") in database

php bin/console artgris:page:import

add --remove-deviants to delete the content of types that have changed (ex: text type in yaml but integer type in bd)

php bin/console artgris:page:import --remove-deviants

add --ignore-names to ignore page and bloc names that have changed

php bin/console artgris:page:import --ignore-names

Remove extra pages/blocks (in database but not in model.yaml)

php bin/console artgris:page:remove:extra

Tutorials

Cache Infos

All blocks of the current page or not linked to a page are cached (and present in the debug bar) after calling one of these twig functions:

content added to the cache after the first call:

not in cache, required new db call after each call:


All versions of page-bundle with dependencies

PHP Build Version
Package Version
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 artgris/page-bundle contains the following files

Loading the files please wait ....