本文整理汇总了PHP中ilObject::create方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObject::create方法的具体用法?PHP ilObject::create怎么用?PHP ilObject::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObject
的用法示例。
在下文中一共展示了ilObject::create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* create question pool object
*/
function create($a_upload = false)
{
parent::create();
if (!$a_upload) {
$this->createMetaData();
}
}
示例2: create
/**
* create object
*
* @param bool upload mode (if enabled no meta data will be created)
*/
function create($a_upload = false)
{
$new_id = parent::create();
if (!$a_upload) {
$this->createMetaData();
}
return $new_id;
}
示例3: create
/**
* create file based lm
*/
function create()
{
global $ilDB;
parent::create();
$this->createDataDirectory();
$ilDB->manipulate("INSERT INTO file_based_lm (id, is_online, startfile) VALUES " . " (" . $ilDB->quote($this->getID(), "integer") . "," . $ilDB->quote("n", "text") . "," . $ilDB->quote($this->getStartfile(), "text") . ")");
$this->createMetaData();
}
示例4: create
/**
* create questionpool object
*/
function create($a_upload = false)
{
parent::create();
// meta data will be created by
// import parser
if (!$a_upload) {
$this->createMetaData();
}
}
示例5: create
/**
* create object
* @return integer
*/
function create()
{
global $ilDB;
$new_id = parent::create();
$fields = $this->getDBFields();
$fields["booking_pool_id"] = array("integer", $new_id);
$ilDB->insert("booking_settings", $fields);
return $new_id;
}
示例6: create
/**
* create content object
*/
function create($a_no_meta_data = false)
{
global $ilUser;
parent::create();
// meta data will be created by
// import parser
if (!$a_no_meta_data) {
$this->createMetaData();
}
$this->createProperties();
}
示例7: create
/**
* create file based lm
*/
function create($upload = false)
{
global $ilDB;
parent::create();
if (!$upload) {
$this->createMetaData();
}
$this->createDataDirectory();
$ilDB->manipulateF('
INSERT INTO sahs_lm (id, c_online, api_adapter, c_type, editable, seq_exp_mode,localization)
VALUES (%s,%s,%s,%s,%s,%s,%s)', array('integer', 'text', 'text', 'text', 'integer', 'integer', 'text'), array($this->getId(), 'n', 'API', $this->getSubType(), (int) $this->getEditable(), (int) $this->getSequencingExpertMode(), $this->getLocalization()));
}
示例8: create
/**
* @return int
*/
public function create()
{
$id = parent::create();
require_once 'Modules/Forum/classes/class.ilForumProperties.php';
$properties = ilForumProperties::getInstance($this->getId());
$properties->setDefaultView(1);
$properties->setAnonymisation(0);
$properties->setStatisticsStatus(0);
$properties->setPostActivation(0);
$properties->setThreadSorting(0);
$properties->insert();
$this->createSettings();
$this->saveData();
return $id;
}
示例9: create
/**
* create glossary object
*/
function create($a_upload = false)
{
global $ilDB;
parent::create();
// meta data will be created by
// import parser
if (!$a_upload) {
$this->createMetaData();
}
$ilDB->manipulate("INSERT INTO glossary (id, is_online, virtual, pres_mode, snippet_length) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote("n", "text") . "," . $ilDB->quote($this->getVirtualMode(), "text") . "," . $ilDB->quote("table", "text") . "," . $ilDB->quote(200, "integer") . ")");
$this->setPresentationMode("table");
$this->setSnippetLength(200);
if ((int) $this->getStyleSheetId() > 0) {
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
}
}
示例10: create
/**
* create
*
*
* @access public
* @return integer object id
*/
function create()
{
global $ilDB;
$this->id = parent::create();
$query = "INSERT INTO role_data " . "(role_id,allow_register,assign_users,disk_quota,wsp_disk_quota) " . "VALUES " . "(" . $ilDB->quote($this->id, 'integer') . "," . $ilDB->quote($this->getAllowRegister(), 'integer') . "," . $ilDB->quote($this->getAssignUsersStatus(), 'integer') . "," . $ilDB->quote($this->getDiskQuota(), 'integer') . "," . $ilDB->quote($this->getPersonalWorkspaceDiskQuota(), 'integer') . ")";
$res = $ilDB->query($query);
return $this->id;
}
示例11: create
/**
* Create mew media cast
*/
function create()
{
global $ilDB;
parent::create();
$query = "INSERT INTO il_media_cast_data (" . " id" . ", is_online" . ", public_files" . ", downloadable" . ", def_access" . ", sortmode" . ", viewmode" . " ) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote((int) $this->getOnline(), "integer") . "," . $ilDB->quote((int) $this->getPublicFiles(), "integer") . "," . $ilDB->quote((int) $this->getDownloadable(), "integer") . "," . $ilDB->quote((int) $this->getDefaultAccess(), "integer") . "," . $ilDB->quote((int) $this->getOrder(), "integer") . "," . $ilDB->quote((int) $this->getViewMode(), "text") . ")";
$ilDB->manipulate($query);
}
示例12: createFromXMLFile
/**
* create style from xml file
*/
function createFromXMLFile($a_file, $a_skip_parent_create = false)
{
global $ilDB;
$this->is_3_10_skin = false;
if (!$a_skip_parent_create) {
parent::create();
}
include_once "./Services/Style/classes/class.ilStyleImportParser.php";
$importParser = new ilStyleImportParser($a_file, $this);
$importParser->startParsing();
// store style parameter
foreach ($this->style as $style) {
foreach ($style as $tag) {
$id = $ilDB->nextId("style_parameter");
// migrate old table PageFrame/PageContainer to div
if (in_array($tag["class"], array("PageFrame", "PageContainer")) && $tag["tag"] == "table") {
$tag["tag"] = "div";
if ($tag["parameter"] == "width" && $tag["value"] == "100%") {
continue;
}
}
$q = "INSERT INTO style_parameter (id,style_id, tag, class, parameter, type, value) VALUES " . "(" . $ilDB->quote($id, "integer") . "," . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($tag["tag"], "text") . "," . $ilDB->quote($tag["class"], "text") . "," . $ilDB->quote($tag["parameter"], "text") . "," . $ilDB->quote($tag["type"], "text") . "," . $ilDB->quote($tag["value"], "text") . ")";
//echo "<br>-$q";
$ilDB->manipulate($q);
}
}
// store characteristics
$this->is_3_10_skin = true;
if (is_array($this->chars)) {
foreach ($this->chars as $char) {
if ($char["type"] != "") {
$s = substr($char["class"], strlen($char["class"]) - 6);
if ($s != ":hover") {
$q = "INSERT INTO style_char (style_id, type, characteristic) VALUES " . "(" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($char["type"], "text") . "," . $ilDB->quote($char["class"], "text") . ")";
$ilDB->manipulate($q);
$this->is_3_10_skin = false;
}
}
}
}
// add style_data record
$q = "INSERT INTO style_data (id, uptodate) VALUES " . "(" . $ilDB->quote($this->getId(), "integer") . ", 0)";
$ilDB->manipulate($q);
$this->update();
$this->read();
if ($this->is_3_10_skin) {
$this->do_3_10_Migration();
}
//$this->writeCSSFile();
}
示例13: create
/**
* create
*
* note: title, description and type should be set when this function is called
*
* @return integer object id
*/
public function create()
{
parent::create();
$this->write();
}
示例14: create
/**
* create media object in db
*/
function create($a_create_meta_data = false, $a_save_media_items = true)
{
parent::create();
if (!$a_create_meta_data) {
$this->createMetaData();
}
if ($a_save_media_items) {
$media_items =& $this->getMediaItems();
for ($i = 0; $i < count($media_items); $i++) {
$item =& $media_items[$i];
$item->setMobId($this->getId());
$item->setNr($i + 1);
$item->create();
}
}
self::handleQuotaUpdate($this);
}
示例15: create
/**
* create new media pool
*/
function create()
{
global $ilDB;
parent::create();
$ilDB->manipulate("INSERT INTO mep_data " . "(id, default_width, default_height) VALUES (" . $ilDB->quote($this->getId(), "integer") . ", " . $ilDB->quote($this->getDefaultWidth(), "integer") . ", " . $ilDB->quote($this->getDefaultHeight(), "integer") . ")");
$this->createMepTree();
}