attek/text

针对位置敏感的帮助的文本引擎

维护者

详细信息

github.com/Attek/ptetext

源代码

问题

安装: 33

依赖: 0

建议: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:yii2-extension

0.1.2 2018-07-24 07:38 UTC

This package is not auto-updated.

Last update: 2024-09-29 06:06:51 UTC


README

安装

使用 Composer 安装

安装此扩展的首选方法是使用 composer.

运行以下命令:

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

数据库表

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

使用方法

在配置文件(web.php)中设置

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

字段上下文帮助的弹出提示

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'])     
...

上下文帮助的弹出提示

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'])