New version 0.9 has been released! Jun 16, 2015
×

Text module

Description

Text module helps you to create live editable texts on frontend.


Include

use yii\easyii\modules\text\api\Text;


Public functions

string Text::get( $id )
$id integer / string Text identifier can be integer (id) or string (slug)

examples

Text::get(1);
Text::get('welcome-text');
"Some text" IF text with id == 1 or slug == 'welcome-text' exists
"" IF text is not exist
"<a href="...">Create text</a>" IF text is not exist and user logged in