当前位置: 首页>>代码示例>>PHP>>正文


PHP CHtml::linkButton方法代码示例

本文整理汇总了PHP中CHtml::linkButton方法的典型用法代码示例。如果您正苦于以下问题:PHP CHtml::linkButton方法的具体用法?PHP CHtml::linkButton怎么用?PHP CHtml::linkButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CHtml的用法示例。


在下文中一共展示了CHtml::linkButton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderButton

 protected function renderButton($label, $htmlOptions)
 {
     if (is_string($htmlOptions)) {
         $label = $htmlOptions;
         $htmlOptions = array();
     }
     if (isset($htmlOptions['type']) && $htmlOptions['type'] == 'link') {
         $htmlOptions['class'] = 'limebutton';
         echo CHtml::linkButton($label, $htmlOptions);
     } else {
         echo CHtml::submitButton($label, $htmlOptions);
     }
 }
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:13,代码来源:SettingsWidget.php

示例2: array

									<?php 
    if (Yii::app()->user->checkAccess('AdminNavigationCreate')) {
        ?>
										<?php 
        echo CHtml::link(Yii::t('app', 'Добавить подпункт'), $this->createUrl('pro/create', array('parent_id' => $tree['id'])));
        ?>
									<?php 
    }
    ?>
								</li>
								<li>
									<?php 
    if (Yii::app()->user->checkAccess('AdminNavigationDelete') && $tree['tree_level'] != (int) TRUE) {
        ?>
										<?php 
        echo CHtml::linkButton(Yii::t('app', 'Удалить'), array('submit' => array('pro/delete/', 'id' => $tree['id']), 'params' => array(Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken), 'confirm' => Yii::t('app', 'Удалить пункт? Если пункт имеет подпункты, то они также будут удалены')));
        ?>
									<?php 
    }
    ?>
								</li>
							</ul>
						</div>
					</td>
				</tr>
                <?php 
}
?>
            </tbody>
        </table>
	</div>
开发者ID:hikaram,项目名称:utitheme,代码行数:31,代码来源:index.php

示例3: createButton

 /**
  * Creates the button element.
  * @return string the created button.
  */
 protected function createButton()
 {
     switch ($this->buttonType) {
         case self::BUTTON_BUTTON:
             return CHtml::htmlButton($this->label, $this->htmlOptions);
         case self::BUTTON_SUBMIT:
             $this->htmlOptions['type'] = 'submit';
             return CHtml::htmlButton($this->label, $this->htmlOptions);
         case self::BUTTON_RESET:
             $this->htmlOptions['type'] = 'reset';
             return CHtml::htmlButton($this->label, $this->htmlOptions);
         case self::BUTTON_SUBMITLINK:
             return CHtml::linkButton($this->label, $this->htmlOptions);
         case self::BUTTON_AJAXLINK:
             return CHtml::ajaxLink($this->label, $this->url, $this->ajaxOptions, $this->htmlOptions);
         case self::BUTTON_AJAXBUTTON:
             $this->ajaxOptions['url'] = $this->url;
             $this->htmlOptions['ajax'] = $this->ajaxOptions;
             return CHtml::htmlButton($this->label, $this->htmlOptions);
         case self::BUTTON_AJAXSUBMIT:
             $this->ajaxOptions['type'] = 'POST';
             $this->ajaxOptions['url'] = $this->url;
             $this->htmlOptions['type'] = 'submit';
             $this->htmlOptions['ajax'] = $this->ajaxOptions;
             return CHtml::htmlButton($this->label, $this->htmlOptions);
         default:
         case self::BUTTON_LINK:
             return CHtml::link($this->label, $this->url, $this->htmlOptions);
     }
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:34,代码来源:TbButton.php

示例4: array

		<?php 
echo $form->error($model, 'description');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'bizrule');
?>
		<?php 
echo $form->textArea($model, 'bizrule', array('rows' => 6, 'cols' => 50));
?>
		<?php 
echo $form->error($model, 'bizrule');
?>
	</div>


	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
echo CHtml::linkButton('Cancel', array('href' => array('permission/roles')));
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- form -->
开发者ID:rainyjune,项目名称:YSMusic,代码行数:30,代码来源:_form.php

示例5: array

        if ($value->redactor != NULL) {
            echo $value->redactor->username;
        }
        ?>
</td>
                            <td style="padding-left: 15px; padding-right: 5px;">
                                <a href="<?php 
        echo $this->createUrl('conditions/view/id/' . $value->id);
        ?>
">Просмотреть</a>
                                <a href="<?php 
        echo $this->createUrl('conditions/create/action/edit/id/' . $value->id);
        ?>
">Редактировать</a>
                                <?php 
        echo CHtml::linkButton('Удалить', array('submit' => array('conditions/delete', 'id' => $value->id), 'params' => array('YII_CSRF_TOKEN' => Yii::app()->request->csrfToken), 'confirm' => "Удалить условие?"));
        ?>
                            </td>
                        </tr>
                    <?php 
    }
    ?>
 
                        
                <?php 
}
?>
            </tbody>
        </table>

        <br /><?php 
开发者ID:hikaram,项目名称:utitheme,代码行数:31,代码来源:index.php

示例6: array

									<?php 
            if (Yii::app()->user->checkAccess('AdminPagesPageEdit') && (Yii::app()->user->username == Yii::app()->params['superAdminInfo']['username'] || $page->is_edit_admin)) {
                ?>
										<?php 
                echo CHtml::link('<i class="glyphicon glyphicon-pencil"></i>', $this->createUrl('lite/edit', array('id' => $page->id)), array('class' => 'btn green-seagreen tooltips', 'data-container' => 'body', 'data-placement' => 'bottom', 'data-original-title' => Yii::t('app', 'Редактировать')));
                ?>
									<?php 
            }
            ?>
										
									<?php 
            if (Yii::app()->user->checkAccess('AdminPagesPageDelete') && (Yii::app()->user->username == Yii::app()->params['superAdminInfo']['username'] || $page->is_edit_admin)) {
                ?>
										<?php 
                echo CHtml::linkButton('<i class="glyphicon glyphicon-remove"></i>', array('submit' => array('lite/delete', 'id' => $page->id), 'params' => array('YII_CSRF_TOKEN' => Yii::app()->request->csrfToken), 'confirm' => Yii::t('app', 'Удалить страницу ?'), 'class' => 'btn red tooltips', 'data-container' => 'body', 'data-placement' => 'bottom', 'data-original-title' => Yii::t('app', 'Удалить')));
                ?>
									<?php 
            }
            ?>
								</td>
							</tr>
							<?php 
        }
        ?>
						</tbody>
					</table>
				</div>
	            <?php 
        $this->widget('CLinkPager', array('pages' => $pages, 'nextPageLabel' => '<i class="fa fa-angle-double-right"></i>', 'prevPageLabel' => '<i class="fa fa-angle-double-left"></i>', 'header' => '', 'selectedPageCssClass' => 'active', 'htmlOptions' => array('class' => 'pagination')));
        ?>
开发者ID:hikaram,项目名称:utitheme,代码行数:30,代码来源:index.php

示例7: getRevokeAssignmentLink

 /**
  * Returns the markup for the revoke assignment link.
  * @return string the markup.
  */
 public function getRevokeAssignmentLink()
 {
     return CHtml::linkButton(Rights::t('core', 'Revoke'), array('submit' => array('assignment/revoke', 'id' => $this->userId, 'name' => $this->owner->name), 'class' => 'revoke-link', 'csrf' => Yii::app()->request->enableCsrfValidation));
 }
开发者ID:rusli-nasir,项目名称:smsempresayii,代码行数:8,代码来源:RightsAuthItemBehavior.php

示例8: createButton

 /**
  * Creates a button the of given type.
  * @param string $type the button type.
  * @param string $label the button label.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the button.
  * @throws CException if the button type is valid.
  */
 protected static function createButton($type, $label, $htmlOptions)
 {
     $url = TbArray::popValue('url', $htmlOptions, '#');
     $ajaxOptions = TbArray::popValue('ajaxOptions', $htmlOptions, array());
     switch ($type) {
         case self::BUTTON_TYPE_HTML:
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_SUBMIT:
             $htmlOptions['type'] = 'submit';
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_RESET:
             $htmlOptions['type'] = 'reset';
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_IMAGE:
             return parent::imageButton($label, $htmlOptions);
         case self::BUTTON_TYPE_LINKBUTTON:
             return parent::linkButton($label, $htmlOptions);
         case self::BUTTON_TYPE_AJAXLINK:
             return parent::ajaxLink($label, $url, $ajaxOptions, $htmlOptions);
         case self::BUTTON_TYPE_AJAXBUTTON:
             $htmlOptions['ajax'] = $ajaxOptions;
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_INPUTBUTTON:
             return parent::button($label, $htmlOptions);
         case self::BUTTON_TYPE_INPUTSUBMIT:
             $htmlOptions['type'] = 'submit';
             return parent::button($label, $htmlOptions);
         case self::BUTTON_TYPE_LINK:
             return self::link($label, $url, $htmlOptions);
         default:
             throw new CException('Invalid button type "' . $type . '".');
     }
 }
开发者ID:juankie,项目名称:gestcb9git,代码行数:41,代码来源:TbHtml.php

示例9: array

			<div class="photo"><?php 
    if ($m->photo) {
        echo CHtml::link($m->photo->img(array("w" => "100")), array('view', 'id' => $m->id));
    }
    ?>
</div>
			<div class="title" style="bottom:55px; text-align:left"><?php 
    echo CHtml::encode($m->name);
    ?>
</div>
			<div class="pay" style="bottom:30px;"><?php 
    echo str_replace(' ', '<i style="padding:0 .1em;"></i>', number_format($m->price, 0, ',', ' '));
    ?>
</div>
			<div><?php 
    echo CHtml::linkButton(CartModule::t('Delete Relation', 'product'), array('submit' => array('delrel', 'pid' => $model->id, 'pr_id' => $m->id), 'confirm' => CartModule::t('Are you sure to delete this relation?', 'product')));
    ?>
</div>
		</div>
	<?php 
}
?>
	


	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? CartModule::t('Create') : CartModule::t('Save'));
?>
	</div>
开发者ID:boyatomic32,项目名称:yii-cart,代码行数:30,代码来源:_form.php

示例10: array

echo Yii::t('app', 'Просмотр пункта');
?>
: <?php 
echo CHtml::encode($modelNavigationLang->title);
?>
		</h3>
		<div class="tools">
			<a href="<?php 
echo $this->createUrl('edit', array('id' => $modelNavigation->id));
?>
"><i class="fa fa-pencil"></i></a>
			<?php 
echo CHtml::form('', 'post', array('style' => 'padding: 0; display: inline; margin-left: 5px;'));
?>
				<?php 
echo CHtml::linkButton('<i class="fa fa-times"></i>', array('submit' => array('delete', 'id' => $modelNavigation->id), 'params' => array(Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken), 'confirm' => Yii::t('app', 'Удалить пункт меню? Если пункт имеет подпункты, то они также будут удалены.')));
?>
			<?php 
echo CHtml::endForm();
?>
		</div>
	</div>
	<div class="portlet-body">
		<div class="row">
			<div class="col-md-3 text-right"><?php 
echo CHtml::encode($modelNavigation->getAttributeLabel('id'));
?>
</div>
			<div class="col-md-9"><?php 
echo CHtml::encode($modelNavigation->id);
?>
开发者ID:hikaram,项目名称:utitheme,代码行数:31,代码来源:view.php

示例11: array

                       
                        <?php 
    echo CHtml::link(CHtml::encode('Просмотр'), array('view', 'id' => $modelsCategory->id));
    echo '</br>';
    ?>
                        <?php 
    echo CHtml::link(CHtml::encode('Редактирование'), array('update', 'id' => $modelsCategory->id));
    echo '</br>';
    ?>
						<?php 
    echo CHtml::link(CHtml::encode('Перейти в категорию'), array('/admin/uploads/default/index', 'id' => $modelsCategory->id));
    echo '</br>';
    ?>
                        
                        <?php 
    echo CHtml::linkButton('Удалить', array('submit' => array('delete', 'id' => $modelsCategory->id), 'params' => array('YII_CSRF_TOKEN' => Yii::app()->request->csrfToken), 'confirm' => "Удалить категорию ?"));
    ?>
                        
                       </br>
                
                    </td>

                    
              
                </tr>
                
                <?php 
}
?>
    </tbody>
</table>
开发者ID:hikaram,项目名称:utitheme,代码行数:30,代码来源:index.php

示例12: array

?>
<h1><?php 
echo Yii::t("UserModule.user", 'View Profile Field #') . $model->varname;
?>
</h1>

<ul class="actions">
	<li><?php 
echo CHtml::link(Yii::t("UserModule.user", 'Manage User'), array('user/admin'));
?>
</li>
	<li><?php 
echo CHtml::link(Yii::t("UserModule.user", 'Create Profile Field'), array('create'));
?>
</li>
	<li><?php 
echo CHtml::link(Yii::t("UserModule.user", 'Update Profile Field'), array('update', 'id' => $model->id));
?>
</li>
	<li><?php 
echo CHtml::linkButton(Yii::t("UserModule.user", 'Delete Profile Field'), array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure to delete this item?'));
?>
</li>
	<li><?php 
echo CHtml::link(Yii::t("UserModule.user", 'Manage Profile Field'), array('admin'));
?>
</li>
</ul><!-- actions -->

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'varname', 'title', 'field_type', 'field_size', 'field_size_min', 'required', 'match', 'range', 'error_message', 'other_validator', 'default', 'position', 'visible')));
开发者ID:reubsc,项目名称:sds,代码行数:31,代码来源:view.php

示例13: array

	<div class="div_actions">
		
			<?php 
echo CHtml::form();
?>
		
		
			<?php 
echo CHtml::hiddenField('id', $model->id);
?>
			
		
			<?php 
if (Yii::app()->user->checkAccess('pperm_manage_bugs', array('project_id' => Yii::app()->user->getCurProjectId()))) {
    echo CHtml::link('Comment/Change', '#', array('id' => 'link-make-changes'));
    echo CHtml::linkButton('Delete Bug', array('submit' => Yii::app()->createUrl('bug/delete'), 'confirm' => "Are you sure you want to permanently delete the bug #" . $model->id . "?"));
}
?>
	
		
			<?php 
echo CHtml::endForm();
?>
		
	</div>	
</div>

<div class="span-27 last" id="<?php 
if ($model->status <= Bug::STATUS_OPEN_MAX) {
    echo 'bug-header';
} else {
开发者ID:xyzz,项目名称:CrashFix,代码行数:31,代码来源:view.php

示例14: array

        echo $this->createUrl('view', array('id' => $modelWalletsPurpose->id));
        ?>
" class="btn blue-steel">
								<i class="glyphicon glyphicon-eye-open"></i>
							</a>
							<a href="<?php 
        echo $this->createUrl('update', array('id' => $modelWalletsPurpose->id));
        ?>
" class="btn green-seagreen">
								<i class="glyphicon glyphicon-pencil"></i>
							</a>
							<?php 
        echo CHtml::form('', 'post', array('class' => 'btn', 'style' => 'padding: 0;'));
        ?>
								<?php 
        echo CHtml::linkButton('<button class="btn red"><i class="glyphicon glyphicon-remove"></i></button>', array('submit' => array('delete', 'id' => $modelWalletsPurpose->id), 'params' => array(Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken), 'confirm' => "Удалить данное назначение кошелька? Данное действие может привести к невозможности выполнять финаносовые операции."));
        ?>
							<?php 
        echo CHtml::endForm();
        ?>
            
						</td>
					</tr>
					<?php 
    }
    ?>
				</tbody>
			</table>
		</div>
	</div>
</div>
开发者ID:hikaram,项目名称:utitheme,代码行数:31,代码来源:index.php

示例15: array

<?php
$this->title = Yum::t('Confirm deletion');

$this->breadcrumbs = array(
	Yum::t('Users') => Users::url('admin'),
	Yum::t('Delete account'));

printf('<h2>%s</h2>', Yum::t('Are you really sure you want to delete your Account?'));

printf('<p>%s</p>', Yum::t('Please enter your password to confirm deletion:'));

echo CHtml::form(array('delete'));
echo CHtml::passwordField('confirmPassword') . "<br />";
echo CHtml::linkButton(Yum::t('Cancel deletion'), array(
			'submit' => array('profile')));
echo CHtml::submitButton(Yum::t('Confirm deletion'));
echo CHtml::endForm();
?>
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:18,代码来源:confirmDeletion.php


注:本文中的CHtml::linkButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。