attek/text

Text engine for location-sensitive help

Maintainers

Details

github.com/Attek/ptetext

Source

Issues

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.2 2018-07-24 07:38 UTC

This package is not auto-updated.

Last update: 2024-04-14 03:28:15 UTC


README

Installation

Install With Composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require attek/pte-text "*"

Database table

yii migrate --migrationPath=@attek/text/migrations

Usage

Set in config file (web.php)

'modules' => [
    ...
    'text' => [
            'class' => 'attek\text\Module',            
    ]
    ...
]

Popover for field contextual help

attek\text\assets\HelpAsset::register($this);

...
$form = ActiveForm::begin( 
    [ 'fieldConfig' => [ 'class' => 'attek\text\components\ActiveField' ]
...
 $form->field( $model, 'name' )->textInput()->hint('Text for popup', ['slug' => 'slug-name'])     
...

Popover for contextual help

attek\text\assets\HelpAsset::register($this);

echo Html::a(Html::tag('i', '', ['class' => 'fa fa-question-circle']), null,
                                ['data-slug' => 'slug-name',  'data-toggle'=> 'popover', 'title' => 'Title for help'])