/**
  * @param integer $id
  * @return string
  */
 public function actionRenderObjectParts($id)
 {
     $parts = Part::find(['dst_id' => $id])->all();
     $data = ArrayHelper::index($parts, 'id', ['model_type_label', 'model_id']);
     return $this->renderAjax('_objectParts', ['data' => $data]);
 }
Пример #2
0
 public function attributeLabels()
 {
     return array_merge(parent::attributeLabels(), ['place_in' => Yii::t('hipanel:stock', 'Location'), 'partno_like' => Yii::t('hipanel:stock', 'Part No.'), 'serial_like' => Yii::t('hipanel:stock', 'Serial'), 'order_data_like' => Yii::t('hipanel:stock', 'Order'), 'move_descr_like' => Yii::t('hipanel:stock', 'Move description'), 'src_name_like' => Yii::t('hipanel:stock', 'Source'), 'dst_name_like' => Yii::t('hipanel:stock', 'Destination')]);
 }