本文整理汇总了PHP中Y::sklonyator方法的典型用法代码示例。如果您正苦于以下问题:PHP Y::sklonyator方法的具体用法?PHP Y::sklonyator怎么用?PHP Y::sklonyator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Y
的用法示例。
在下文中一共展示了Y::sklonyator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionRequestForm
public function actionRequestForm($id, $type, $holes)
{
if ($id) {
$gibdd = GibddHeads::model()->findByPk((int) $id);
$holemodel = Holes::model()->findAllByPk(explode(',', $holes));
$gibddModel = new GibddRuForm();
$usermodel = Yii::app()->user->userModel;
$model = new HoleRequestForm();
$model->sendToGibddru = 1;
$model->to = $gibdd ? $gibdd->post_dative . ' ' . $gibdd->fio_dative : '';
$model->signature = $usermodel->relProfile->request_signature ? $usermodel->relProfile->request_signature : $usermodel->last_name . ' ' . substr($usermodel->name, 0, 2) . ($usermodel->name ? '.' : '') . ' ' . substr($usermodel->second_name, 0, 2) . ($usermodel->second_name ? '.' : '');
$model->postaddress = $usermodel->relProfile->request_address ? $usermodel->relProfile->request_address : '';
if ($type == 'gibdd') {
if (count($holemodel) > 1) {
$model->holes = CHtml::listData($holemodel, 'ID', 'ID');
} elseif (count($holemodel) == 1) {
$model->address = CHtml::encode($holemodel[0]->ADDRESS);
}
$gibddModel = $model->getResult($holemodel[0]);
if ($gibddModel) {
$model->from = Y::sklonyator($gibddModel->f_fam, 2) . ' ' . Y::sklonyator($gibddModel->f_name, 2) . ' ' . Y::sklonyator($gibddModel->f_coname, 2);
$model->signature = $gibddModel->f_fam . ' ' . substr($gibddModel->f_name, 0, 2) . ($gibddModel->f_name ? '.' : '') . ' ' . substr($gibddModel->f_coname, 0, 2) . ($gibddModel->f_coname ? '.' : '');
$model->postaddress = ($gibddModel->f_ind ? $gibddModel->f_ind . ', ' : '') . ($gibddModel->f_reg ? $gibddModel->f_reg . ', ' : '') . ($gibddModel->f_npunkt ? $gibddModel->f_npunkt . ', ' : '') . $gibddModel->f_addr;
}
if (count($holemodel) > 1) {
$model->address = CHtml::encode(implode('; ', CHtml::listData($holemodel, 'ID', 'ADDRESS')));
$this->renderPartial('_form_gibdd_manyholes', array('model' => $model, 'holes' => $holemodel, 'gibdd' => $gibdd, 'gibddModel' => $gibddModel, 'error' => ''));
} elseif (count($holemodel) == 1) {
$this->renderPartial('_form_gibdd', array('model' => $model, 'hole' => $holemodel[0], 'gibdd' => $gibdd, 'gibddModel' => $gibddModel, 'error' => ''));
}
}
}
}
示例2: setAttribsFromGibddForm
public function setAttribsFromGibddForm($gibddModel)
{
$this->from = Y::sklonyator($gibddModel->f_fam, 2) . ' ' . Y::sklonyator($gibddModel->f_name, 2) . ' ' . Y::sklonyator($gibddModel->f_coname, 2);
$this->signature = $gibddModel->f_fam . ' ' . substr($gibddModel->f_name, 0, 2) . ($gibddModel->f_name ? '.' : '') . ' ' . substr($gibddModel->f_coname, 0, 2) . ($gibddModel->f_coname ? '.' : '');
$this->postaddress = ($gibddModel->f_ind ? $gibddModel->f_ind . ', ' : '') . ($gibddModel->f_reg ? $gibddModel->f_reg . ', ' : '') . ($gibddModel->f_npunkt ? $gibddModel->f_npunkt . ', ' : '') . $gibddModel->f_addr;
}
示例3: sklonyator
public function sklonyator($str)
{
return Y::sklonyator($str);
}