本文整理汇总了PHP中CSpan::setAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP CSpan::setAttributes方法的具体用法?PHP CSpan::setAttributes怎么用?PHP CSpan::setAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSpan
的用法示例。
在下文中一共展示了CSpan::setAttributes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CSpan
$step['timeout'] = 15;
}
if (!isset($step['url'])) {
$step['url'] = '';
}
if (!isset($step['posts'])) {
$step['posts'] = '';
}
if (!isset($step['required'])) {
$step['required'] = '';
}
$numSpan = new CSpan($i++ . ':');
$numSpan->addClass('rowNum');
$numSpan->setAttribute('id', 'current_step_' . $stepid);
$name = new CSpan($step['name'], 'link');
$name->setAttributes(array('id' => 'name_' . $stepid, 'name_step' => $stepid));
if (zbx_strlen($step['url']) > 70) {
$url = new CSpan(substr($step['url'], 0, 35) . SPACE . '...' . SPACE . substr($step['url'], zbx_strlen($step['url']) - 25, 25));
$url->setHint($step['url']);
} else {
$url = $step['url'];
}
if ($this->data['templated']) {
$removeButton = SPACE;
$dragHandler = SPACE;
} else {
$removeButton = new CButton('remove_' . $stepid, _('Remove'), 'javascript: removeStep(this);', 'link_menu');
$removeButton->setAttribute('remove_step', $stepid);
$dragHandler = new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move');
}
$row = new CRow(array($dragHandler, $numSpan, $name, $step['timeout'] . SPACE . _('sec'), $url, htmlspecialchars($step['required']), $step['status_codes'], $removeButton), 'sortable', 'steps_' . $stepid);