Questions tagged as 'yii'

1
answer

How to save data from a CArrayDataProvider in the database?

Hello, I have a CArrayDataProvider and I wanted to save your data to a table via a model, I already tried it in several ways and did not get results, what would be the best way to save it? My last attempt so far: foreach...
asked by 25.05.2018 / 15:36
1
answer

Yii2 textinput () and httml :: submitButton on the same line

I need an example in Yii2 that allows me to put some submitButton and textinput () on the same line, as the example below: part of my code that mounts the buttons: <?= Html::submitButton(Yii::t('app','Voltar'), ['class' => 'btn...
asked by 31.08.2017 / 01:22
1
answer

Yii2 Multi input framework on the same form

I'm using the widget widget along with yii2 and I'm having a commit-time error. My scenario is as follows: In my catalog form the user can create the catalog , create as many catalog items as he wants. That is, I use in the catalog crea...
asked by 08.12.2016 / 02:30
2
answers

Inserting Multiple Models into a Yii2 Form

Hello everyone I'm starting on yii2, and I have a question I'm making a form in which I insert two different models into a single form, but I'm not able to do the create: Here is the code I did: public function actionCreate() { $...
asked by 06.06.2016 / 05:01
1
answer

How to create access restriction for an action on yii2.0

I need the client user to just view the posts records of my system. I would like to know how to restrict on-screen actions to the client user, so that this user can only view the records, and not appear for him the change, delete and register bu...
asked by 28.03.2016 / 12:43
3
answers

Authentication yii through the user module

I am using the module user yii whose code is in this link , but in my database I also have a client table. Is it possible to use the login of the user module to authenticate the client or do I have to create another login for the client? Or...
asked by 01.10.2014 / 15:56
1
answer

How to get the contents of another table in Yii?

I would like instead of the ID, display the name of the employee. <?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'documento-grid', 'dataProvider'=>$model->search(), 'columns'=>array( 'id_do...
asked by 29.10.2014 / 20:53
3
answers

How to get the value of the user ID in CGridView - Yii

Instead of {{ VALOR DO ID }} I would like to place the ID of the respective user. Seeing that this is a Row of a Grid . <?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'usuario-grid',...
asked by 25.04.2014 / 19:38
0
answers

How to store / br and \ n in the database, and display in HTML then when it is called?

I'm storing the description of an offer in the ofe_desc attribute , but even though in TextArea I insert break lines, bank and HTML (when I try to collect the data), they are all shown in a single line. Following codes: <!-- Mostra na...
asked by 29.10.2018 / 20:07
0
answers

How to use Web Services in Yii 1?

I followed the steps of the tutorial below but I'm having an error when I call via client soap. link DRIVER: <?php ini_set('soap.wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 10); ini_set('default_socket_timeout', 15); i...
asked by 09.07.2018 / 16:56