Questions tagged [yii2-extension]

We use the term "extension" to refer to Yii2-specific software packages. For general purpose software packages that can be used without Yii, we will refer to them using the term "package" or "library".

Extensions are redistributable software packages specifically designed to be used in Yii applications and provide ready-to-use features.

For example, the yiisoft/yii2-debug extension adds a handy debug toolbar at the bottom of every page in your application to help you more easily grasp how the pages are generated. You can use extensions to accelerate your development process. You can also package your code as extensions to share with other people your great work.

Official Site

56 questions
0
votes
2 answers

Yii2: Override 3rd party mail views

How do we override mail view files of a 3rd party module/component? Let's assume a module is using the following code to send an email: Yii::$app->mailer->compose([ 'html' => '@myvendor/mymodule/mail/email-html', 'text' =>…
mae
  • 14,947
  • 8
  • 32
  • 47
0
votes
0 answers

Extension not getting installed through composer in cpanel

I am using yii2 basic application template. I have VPS server for hosting my software. In my cpanel I have installed composer successfully. Then I uploaded my files from local machine to the server. Now I want to do composer update in cpanel using…
Questions
  • 69
  • 1
  • 12
0
votes
1 answer

yii2:why my calender changed to Gregorian after upload?

$time = Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->date]); in my localhost $time is persian (jalali) and after upload $time is english(Gregorian ) how can i change my $time to jalali (perisan)????
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
0 answers

How to change yii2-usuario registration module to allow admin to register users

I have the following use case for my system: Registration: Admin registers a new user i.e. email, username and submits. Email is send to the user to confirm with new password. user confirms email, changes password and goes ahead to…
japheth
  • 373
  • 1
  • 10
  • 34
0
votes
1 answer

Problems using nested dynamic forms in yii2

I'm trying to use nested dynamic forms using this yii2 widget and following this guide but whenever I try to have a second dynamic form nested in the first form I get an error stating TypeError Argument 1 passed to DOMDocument::importNode() must be…
natral
  • 986
  • 1
  • 18
  • 42
0
votes
0 answers

How to change time for stay in login (dekturim users)

I want to change the time of stay in login in my site. How can I change it? I founded $authTimeout for this issue but I can't use that! This is my config of web.php: 'modules' => [ 'user' => [ 'class' => 'dektrium\user\Module', …
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
0 answers

yii2 :how to change language of rbac

i used yii2 users and rbac ( dekturim ) in my project i did change language of project to fa-IR and changed true but in rbac language not changed ! this is my config in console.php 'modules' => [ 'rbac' =>…
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

yii2:use video in use yii\bootstrap\Html

i want use video in DetailView 'attribute' => ['media_id', 'format' => 'html', 'value' => function ($model) { $image = app\models\Media::find()->where(['id' =>…
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
2 answers

yii2:change FCKConfig.DefaultLinkTarget to "_blank" in ckeditor

i want change default target to _blank in create link 'DefaultLinkTarget' => '_blank', how to can do this ! field($model, 'summary')->widget(CKEditor::className(), [ …
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
0 answers

yii2:upload is faild for file larger than 2 mb

i used kartik\file\FileInput for upload my file my file is correct uploaded for file smaller than 2 mb ! what is my problem ???? echo ''; echo FileInput::widget([ 'model' => $model, …
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

yii2 : how to change language of ckeditor

i used use dosamigos\ckeditor\CKEditor in my project in yii2 i want change language of ckeditor in config ! how can i solve my problem? this is my code in _form.php field($model,…
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

Yii2: Export columns order

I would like the export file (expecially XLS) generated by Yii2-export to mimic gridview by exporting all columns in order selected in gridview configuration popup menu. I mean, lets have two columns A and B. In gridview configuration menu (Little…
Lorin
  • 343
  • 4
  • 15
0
votes
1 answer

How to set default value in 2amigos/yii2-taggable-behavior

I want set default value in taggable for my update page but I can't do it! This is my code in _form.php. https://github.com/2amigos/yii2-taggable-behavior field($model, 'tags')->widget(SelectizeTextInput::className(), [ //…
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

How to extend a model that is part of an Yii2 extension?

In my application I'm using an extension (which I own and may modify). This extension has an ActiveRecord based class that I want to extend in the application with another property. Can I do this somehow? Can a Factory help anyhow or Yii…
robsch
  • 9,358
  • 9
  • 63
  • 104
0
votes
1 answer

Yii2 extension: How to declare $sourcePath in assets?

I'm developing an Yii2 extension that uses an AssetBundle for some js/css files: namespace myExtension/assets; class ResourcesAsset extends AssetBundle { public $sourcePath = '@app/assets/resources'; public $css = ['resources.css']; …
robsch
  • 9,358
  • 9
  • 63
  • 104