本文整理汇总了PHP中ilYuiUtil::initAnimation方法的典型用法代码示例。如果您正苦于以下问题:PHP ilYuiUtil::initAnimation方法的具体用法?PHP ilYuiUtil::initAnimation怎么用?PHP ilYuiUtil::initAnimation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilYuiUtil
的用法示例。
在下文中一共展示了ilYuiUtil::initAnimation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addJavaScript
/**
* Add javascript files that are necessary to run accordion
*/
static function addJavaScript()
{
global $tpl;
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
ilYuiUtil::initEvent();
ilYuiUtil::initDom();
ilYuiUtil::initAnimation();
ilYuiUtil::initConnection();
$tpl->addJavaScript("./Services/Accordion/js/accordion.js", true, 3);
}
示例2: getContent
/**
* Get Content.
*/
function getContent()
{
global $lng, $tpl, $ilUser;
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
ilYuiUtil::initEvent();
ilYuiUtil::initDom();
ilYuiUtil::initAnimation();
$tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
$tpl->addJavaScript("Services/Form/js/Form.js");
$this->tpl = new ilTemplate("tpl.property_form.html", true, true, "Services/Form");
// check if form has not title and first item is a section header
// -> use section header for title and remove section header
// -> command buttons are presented on top
$fi = $this->items[0];
if ($this->getMode() == "std" && $this->getTitle() == "" && is_object($fi) && $fi->getType() == "section_header") {
$this->setTitle($fi->getTitle());
unset($this->items[0]);
}
// title icon
if ($this->getTitleIcon() != "" && @is_file($this->getTitleIcon())) {
$this->tpl->setCurrentBlock("title_icon");
$this->tpl->setVariable("IMG_ICON", $this->getTitleIcon());
$this->tpl->parseCurrentBlock();
}
// title
if ($this->getTitle() != "") {
// commands on top
if (count($this->buttons) > 0 && $this->getShowTopButtons()) {
// command buttons
foreach ($this->buttons as $button) {
$this->tpl->setCurrentBlock("cmd2");
$this->tpl->setVariable("CMD", $button["cmd"]);
$this->tpl->setVariable("CMD_TXT", $button["text"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("commands2");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("header");
$this->tpl->setVariable("TXT_TITLE", $this->getTitle());
$this->tpl->setVariable("LABEL", $this->getTopAnchor());
$this->tpl->setVariable("TXT_DESCRIPTION", $this->getDescription());
$this->tpl->parseCurrentBlock();
}
$this->tpl->touchBlock("item");
// properties
$this->required_text = false;
foreach ($this->items as $item) {
if ($item->getType() != "hidden") {
$this->insertItem($item);
}
}
// required
if ($this->required_text && $this->getMode() == "std") {
$this->tpl->setCurrentBlock("required_text");
$this->tpl->setVariable("TXT_REQUIRED", $lng->txt("required_field"));
$this->tpl->parseCurrentBlock();
}
// command buttons
foreach ($this->buttons as $button) {
$this->tpl->setCurrentBlock("cmd");
$this->tpl->setVariable("CMD", $button["cmd"]);
$this->tpl->setVariable("CMD_TXT", $button["text"]);
$this->tpl->parseCurrentBlock();
}
// try to keep uploads even if checking input fails
if ($this->getMultipart()) {
$hash = $_POST["ilfilehash"];
if (!$hash) {
$hash = md5(uniqid(mt_rand(), true));
}
$fhash = new ilHiddenInputGUI("ilfilehash");
$fhash->setValue($hash);
$this->addItem($fhash);
}
// hidden properties
$hidden_fields = false;
foreach ($this->items as $item) {
if ($item->getType() == "hidden") {
$item->insert($this->tpl);
$hidden_fields = true;
}
}
if ($this->required_text || count($this->buttons) > 0 || $hidden_fields) {
$this->tpl->setCurrentBlock("commands");
$this->tpl->parseCurrentBlock();
}
if ($this->getMode() == "subform") {
$this->tpl->touchBlock("sub_table");
} else {
$this->tpl->touchBlock("std_table");
$this->tpl->setVariable('STD_TABLE_WIDTH', $this->getTableWidth());
}
return $this->tpl->get();
}