2017 © Pedro Peláez
 

cakephp-plugin cakephp-textblocks

TextBlocks plugin for CakePHP

image

cakemanager/cakephp-textblocks

TextBlocks plugin for CakePHP

  • Wednesday, June 24, 2015
  • by bobmulder
  • Repository
  • 2 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

TextBlocks plugin for CakePHP

Note: This is a non-stable plugin for CakePHP 3.x at this time. It is currently under development and should be considered experimental., (*1)

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require cakemanager/cakephp-textblocks

Now load the plugin with the command:, (*4)

$ bin/cake plugin load -r -b TextBlocks

Run the database migrations with:, (*5)

$ bin/cake migrations migrate --plugin TextBlocks

Usage

Register

Register new blocks with:, (*6)

Blox::register('my_block');

Getting Content

You can get 2 types of contents: Title and Body. Get your title this way..., (*7)

Blox::title('my_block');

And get your body this way:, (*8)

Blox::body('my_block');

Variables can be passed on both of the getters:, (*9)

// Imagine that the body of 'my_block' is: "Good morning, :name"

Blox::body('my_block', [
    'name' => 'Leonardo'
]);

// Output will be: "Good morning, Leonardo"

Management

The Blocks can be managed by the CakeAdmin plugin, or you can create CRUD yourself., (*10)

The Versions

24/06 2015

dev-master

9999999-dev

TextBlocks plugin for CakePHP

  Sources   Download

The Requires

 

The Development Requires