2017 © Pedro PelΓ‘ez
 

yii2-extension yii2-placer

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона

image

padavvan/yii2-placer

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона

  • Friday, April 13, 2018
  • by padaVVan
  • Repository
  • 2 Watchers
  • 0 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Placer

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist padavvan/yii2-placer "*"

or add, (*4)

"padavvan/yii2-placer": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

<?php

use padavvan\placer\Portlet;
use padavvan\placer\Collection;
use padavvan\placer\RouteDependency;

$portlet1 = new Portlet(['name' => 'portlet1', 'content' => '#1 Portlet']);
$portlet2 = new Portlet(['name' => 'portlet2', 'content' => '#2 Portlet']);
$portlet2->wrap('section', ['class' => 'portlet']);
$portlet3 = new Portlet(['name' => 'portlet3', 'content' => '#3 Portlet']);

// main collection
$placer = new Collection('placer');

$subTop = Collection::create(['name' => 'subTop']);
$subTop
    ->push($portlet1)
    ->push($portlet2)
    ->wrap('div', ['class' => 'well']);

$top = new Collection(['name' => 'top', 'tag' => 'section']);
$top->push($portlet3);
$top->push($subTop);

$bottom = new Collection(['name' => 'bottom', 'tag' => 'div', 'options' => ['class' => 'footer']]);
$bottom->dependency = [
    // view on site/about, site/info, etc
    new RouteDependency('/site/*'),
    // and not view on site/contacts
    new RouteDependency('/site/contacts', true)
    ];

$bottom->push($portlet1);

$placer->push($top);
$placer->push($bottom);

echo $placer->render();
// or
echo $placer->top->render();
echo $placer->bottom->render();

The Versions

13/04 2018

dev-master

9999999-dev

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона

  Sources   Download

MIT

The Requires

 

by Koltsov Oleg

extension yii2

13/04 2018

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона

  Sources   Download

MIT

The Requires

 

by Koltsov Oleg

extension yii2

19/09 2014

dev-stage

dev-stage

Π”ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ΠΎΠ² Π² ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΈ, Π²Ρ‹Π²ΠΎΠ΄ Ρ€Π΅Π½Π΄Π΅Ρ€ΠΈΠ½Π³ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Π² ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π½Ρ‹Ρ… мСстах шаблона

  Sources   Download

MIT

by Koltsov Oleg

extension yii2