本文整理汇总了PHP中Resource::link方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::link方法的具体用法?PHP Resource::link怎么用?PHP Resource::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::link方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_class
<button class="bong-dialog-btn">Add
<script type="text/bongscript" event="click">
bong.dialog({
title: 'New <?php
echo get_class($data->controller) == 'Structs\\Admin\\SpiritController' ? 'Spirit' : 'Controller';
?>
Method',
content: 'Method Name: <input type="text" bong:handle="methodName" value="" />',
buttons: [{
label: 'Create',
isDefault: true,
action: function(){
bong.href('<?php
echo Resource::link();
?>
/project/<?php
echo get_class($data->controller) == 'Structs\\Admin\\SpiritController' ? 'addSpiritMethod' : 'addControllerMethod';
?>
/'+this.methodName.value).eval();
bong.activeDialog().hide();
}
},{
label: 'Cancel',
isDefault: false,
action: function(){
bong.activeDialog().hide();
}
}]
});
</script>
</button>
示例2: function
</div>\
<?php
}
?>
\
</div>\
</fieldset>\
</form>',
buttons: [{
label: 'Go',
isDefault: true,
action: function(){
var dom = this.method;
var methodName = this.methodName.value;
var base = '<?php
echo Resource::link("/" . $data->method->controller()->name() . "/" . $data->method->name());
?>
/';
var args = [];
$('.bong-dialog-form-field').each(function(i, elem){
if(i > 0){
var labelText = $(elem).children('label').html();
var valueText = $(elem).children('input')[0].value;
args.push(valueText);
}
});
window.open(base+args.join('/'), '_blank');
args = [];
}
},{
label: 'Cancel',
示例3: foreach
<ul class="bong-admin-sidebar-components bong-admin-sidebar-components-spirit" id="sidebar_spirit">
<li class="bong-admin-sidebar-components-label">Spirits</li>
<?php
foreach ($data->spirits as $spirit) {
?>
<li class="bong-admin-sidebar-components-item">
<a href="<?php
echo Resource::link('/project/sspirit/' . $spirit->name());
?>
"><?php
echo $spirit->name();
?>
Abstractor</a>
<a class="bong-admin-sidebar-components-item-cross"></a>
</li>
<?php
}
?>
<?php
$controller->spirit('SpiritList')->addNew();
?>
</ul>
示例4: foreach
<ul class="bong-admin-sidebar-components bong-admin-sidebar-components-controller" id="sidebar_controller">
<li class="bong-admin-sidebar-components-label">Controllers</li>
<?php
foreach ($data->controllers as $con) {
?>
<li class="bong-admin-sidebar-components-item <?php
echo $xdo->controllerName && $xdo->controllerName == $con->name() ? 'bong-admin-sidebar-components-item-selected' : null;
?>
">
<a href="<?php
echo Resource::link('/project/controller/' . $con->name());
?>
"><?php
echo $con->name();
?>
Controller</a>
<a class="bong-admin-sidebar-components-item-cross"></a>
</li>
<?php
}
?>
<?php
$controller->spirit('ControllerList')->addNew();
?>
</ul>