Inheritance diagram for ilMDKeyword:
Collaboration diagram for ilMDKeyword:Public Member Functions | |
| ilMDKeyword ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
| setKeyword ($a_keyword) | |
| getKeyword () | |
| setKeywordLanguage (&$lng_obj) | |
| & | getKeywordLanguage () |
| getKeywordLanguageCode () | |
| save () | |
| update () | |
| delete () | |
| __getFields () | |
| read () | |
| toXML (&$writer) | |
| _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type) | |
| ilMDKeyword ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '') | |
| setKeyword ($a_keyword) | |
| getKeyword () | |
| setKeywordLanguage (&$lng_obj) | |
| & | getKeywordLanguage () |
| getKeywordLanguageCode () | |
| save () | |
| update () | |
| delete () | |
| __getFields () | |
| read () | |
| toXML (&$writer) | |
| _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type) | |
Static Public Member Functions | |
| static | _getKeywordsByLanguage ($a_rbac_id, $a_obj_id, $a_type) |
| Get keywords by language. | |
| static | _getKeywordsByLanguageAsString ($a_rbac_id, $a_obj_id, $a_type) |
| Get keywords by language as string. | |
Definition at line 33 of file class.ilMDKeyword.php.
| ilMDKeyword::__getFields | ( | ) |
Definition at line 114 of file class.ilMDKeyword.php.
References getKeyword(), getKeywordLanguageCode(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), and ilMDBase::getRBACId().
{
return array('rbac_id' => $this->getRBACId(),
'obj_id' => $this->getObjId(),
'obj_type' => $this->getObjType(),
'parent_type' => $this->getParentType(),
'parent_id' => $this->getParentId(),
'keyword' => $this->getKeyword(),
'keyword_language' => $this->getKeywordLanguageCode());
}
Here is the call graph for this function:| ilMDKeyword::__getFields | ( | ) |
Definition at line 114 of file class.ilMDKeyword.php.
References getKeyword(), getKeywordLanguageCode(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().
{
return array('rbac_id' => $this->getRBACId(),
'obj_id' => $this->getObjId(),
'obj_type' => ilUtil::prepareDBString($this->getObjType()),
'parent_type' => $this->getParentType(),
'parent_id' => $this->getParentId(),
'keyword' => ilUtil::prepareDBString($this->getKeyword()),
'keyword_language' => ilUtil::prepareDBString($this->getKeywordLanguageCode()));
}
Here is the call graph for this function:| ilMDKeyword::_getIds | ( | $ | a_rbac_id, | |
| $ | a_obj_id, | |||
| $ | a_parent_id, | |||
| $ | a_parent_type | |||
| ) |
Definition at line 166 of file class.ilMDKeyword.php.
References $res.
Referenced by ilMDGeneral::getKeywordIds().
{
global $ilDB;
$query = "SELECT meta_keyword_id FROM il_meta_keyword ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($a_obj_id)." ".
"AND parent_id = ".$ilDB->quote($a_parent_id)." ".
"AND parent_type = ".$ilDB->quote($a_parent_type)." ".
"ORDER BY meta_keyword_id ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->meta_keyword_id;
}
return $ids ? $ids : array();
}
Here is the caller graph for this function:| ilMDKeyword::_getIds | ( | $ | a_rbac_id, | |
| $ | a_obj_id, | |||
| $ | a_parent_id, | |||
| $ | a_parent_type | |||
| ) |
Definition at line 163 of file class.ilMDKeyword.php.
References $res.
{
global $ilDB;
$query = "SELECT meta_keyword_id FROM il_meta_keyword ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($a_obj_id)." ".
"AND parent_id = ".$ilDB->quote($a_parent_id)." ".
"AND parent_type = ".$ilDB->quote($a_parent_type);
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->meta_keyword_id;
}
return $ids ? $ids : array();
}
| static ilMDKeyword::_getKeywordsByLanguage | ( | $ | a_rbac_id, | |
| $ | a_obj_id, | |||
| $ | a_type | |||
| ) | [static] |
Get keywords by language.
public
| int | rbac_id | |
| int | obj_id | |
| string | obj type |
Definition at line 195 of file class.ilMDKeyword.php.
References $keywords, and $res.
Referenced by _getKeywordsByLanguageAsString().
{
global $ilDB,$ilObjDataCache;
$query = "SELECT keyword,keyword_language ".
"FROM il_meta_keyword ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($a_obj_id)." ".
"AND obj_type = ".$ilDB->quote($a_type)." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if($row->keyword)
{
$keywords[$row->keyword_language][] = $row->keyword;
}
}
return $keywords ? $keywords : array();
}
Here is the caller graph for this function:| static ilMDKeyword::_getKeywordsByLanguageAsString | ( | $ | a_rbac_id, | |
| $ | a_obj_id, | |||
| $ | a_type | |||
| ) | [static] |
Get keywords by language as string.
public
| int | rbac_id | |
| int | obj_id | |
| string | obj type |
Definition at line 224 of file class.ilMDKeyword.php.
References $keywords, and _getKeywordsByLanguage().
Referenced by ilMDUtils::_fillHTMLMetaTags().
{
foreach(ilMDKeyword::_getKeywordsByLanguage($a_rbac_id,$a_obj_id,$a_type) as $lng_code => $keywords)
{
$key_string[$lng_code] = implode(",",$keywords);
}
return $key_string ? $key_string : array();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMDKeyword::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 97 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId().
{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_keyword ".
"WHERE meta_keyword_id = ".$ilDB->quote($this->getMetaId());
$this->db->query($query);
return true;
}
return false;
}
Here is the call graph for this function:| ilMDKeyword::delete | ( | ) |
Reimplemented from ilMDBase.
Definition at line 97 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId().
{
global $ilDB;
if($this->getMetaId())
{
$query = "DELETE FROM il_meta_keyword ".
"WHERE meta_keyword_id = ".$ilDB->quote($this->getMetaId());
$this->db->query($query);
return true;
}
return false;
}
Here is the call graph for this function:| ilMDKeyword::getKeyword | ( | ) |
Definition at line 47 of file class.ilMDKeyword.php.
{
return $this->keyword;
}
| ilMDKeyword::getKeyword | ( | ) |
Definition at line 47 of file class.ilMDKeyword.php.
Referenced by __getFields(), and toXML().
{
return $this->keyword;
}
Here is the caller graph for this function:| & ilMDKeyword::getKeywordLanguage | ( | ) |
Definition at line 58 of file class.ilMDKeyword.php.
{
return is_object($this->keyword_language) ? $this->keyword_language : false;
}
| & ilMDKeyword::getKeywordLanguage | ( | ) |
Definition at line 58 of file class.ilMDKeyword.php.
{
return is_object($this->keyword_language) ? $this->keyword_language : false;
}
| ilMDKeyword::getKeywordLanguageCode | ( | ) |
Definition at line 62 of file class.ilMDKeyword.php.
{
return is_object($this->keyword_language) ? $this->keyword_language->getLanguageCode() : false;
}
| ilMDKeyword::getKeywordLanguageCode | ( | ) |
Definition at line 62 of file class.ilMDKeyword.php.
Referenced by __getFields(), and toXML().
{
return is_object($this->keyword_language) ? $this->keyword_language->getLanguageCode() : false;
}
Here is the caller graph for this function:| ilMDKeyword::ilMDKeyword | ( | $ | a_rbac_id = 0, |
|
| $ | a_obj_id = 0, |
|||
| $ | a_obj_type = '' | |||
| ) |
Definition at line 35 of file class.ilMDKeyword.php.
References ilMDBase::ilMDBase().
{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}
Here is the call graph for this function:| ilMDKeyword::ilMDKeyword | ( | $ | a_rbac_id = 0, |
|
| $ | a_obj_id = 0, |
|||
| $ | a_obj_type = '' | |||
| ) |
Definition at line 35 of file class.ilMDKeyword.php.
References ilMDBase::ilMDBase().
{
parent::ilMDBase($a_rbac_id,
$a_obj_id,
$a_obj_type);
}
Here is the call graph for this function:| ilMDKeyword::read | ( | ) |
Definition at line 125 of file class.ilMDKeyword.php.
References $res, ilMDBase::getMetaId(), setKeyword(), setKeywordLanguage(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), and ilMDBase::setRBACId().
{
global $ilDB;
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_keyword ".
"WHERE meta_keyword_id = ".$ilDB->quote($this->getMetaId());
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setRBACId($row->rbac_id);
$this->setObjId($row->obj_id);
$this->setObjType($row->obj_type);
$this->setParentId($row->parent_id);
$this->setParentType($row->parent_type);
$this->setKeyword($row->keyword);
$this->setKeywordLanguage( new ilMDLanguageItem($row->keyword_language));
}
}
return true;
}
Here is the call graph for this function:| ilMDKeyword::read | ( | ) |
Definition at line 125 of file class.ilMDKeyword.php.
References $res, ilMDBase::getMetaId(), setKeyword(), setKeywordLanguage(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), ilMDBase::setRBACId(), and ilUtil::stripSlashes().
{
global $ilDB;
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
if($this->getMetaId())
{
$query = "SELECT * FROM il_meta_keyword ".
"WHERE meta_keyword_id = ".$ilDB->quote($this->getMetaId());
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setRBACId($row->rbac_id);
$this->setObjId($row->obj_id);
$this->setObjType($row->obj_type);
$this->setParentId($row->parent_id);
$this->setParentType($row->parent_type);
$this->setKeyword(ilUtil::stripSlashes($row->keyword));
$this->setKeywordLanguage( new ilMDLanguageItem($row->keyword_language));
}
}
return true;
}
Here is the call graph for this function:| ilMDKeyword::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 67 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{
if($this->db->autoExecute('il_meta_keyword',
$this->__getFields(),
DB_AUTOQUERY_INSERT))
{
$this->setMetaId($this->db->getLastInsertId());
return $this->getMetaId();
}
return false;
}
Here is the call graph for this function:| ilMDKeyword::save | ( | ) |
Reimplemented from ilMDBase.
Definition at line 67 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId(), and ilMDBase::setMetaId().
{
if($this->db->autoExecute('il_meta_keyword',
$this->__getFields(),
DB_AUTOQUERY_INSERT))
{
$this->setMetaId($this->db->getLastInsertId());
return $this->getMetaId();
}
return false;
}
Here is the call graph for this function:| ilMDKeyword::setKeyword | ( | $ | a_keyword | ) |
Definition at line 43 of file class.ilMDKeyword.php.
{
$this->keyword = $a_keyword;
}
| ilMDKeyword::setKeyword | ( | $ | a_keyword | ) |
Definition at line 43 of file class.ilMDKeyword.php.
Referenced by read().
{
$this->keyword = $a_keyword;
}
Here is the caller graph for this function:| ilMDKeyword::setKeywordLanguage | ( | &$ | lng_obj | ) |
Definition at line 51 of file class.ilMDKeyword.php.
Referenced by read().
{
if(is_object($lng_obj))
{
$this->keyword_language = $lng_obj;
}
}
Here is the caller graph for this function:| ilMDKeyword::setKeywordLanguage | ( | &$ | lng_obj | ) |
Definition at line 51 of file class.ilMDKeyword.php.
{
if(is_object($lng_obj))
{
$this->keyword_language = $lng_obj;
}
}
| ilMDKeyword::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 156 of file class.ilMDKeyword.php.
References getKeyword(), and getKeywordLanguageCode().
{
$writer->xmlElement('Keyword',array('Language' => $this->getKeywordLanguageCode()),$this->getKeyword());
}
Here is the call graph for this function:| ilMDKeyword::toXML | ( | &$ | writer | ) |
Reimplemented from ilMDBase.
Definition at line 156 of file class.ilMDKeyword.php.
References getKeyword(), and getKeywordLanguageCode().
{
$writer->xmlElement('Keyword',array('Language' => $this->getKeywordLanguageCode() ?
$this->getKeywordLanguageCode() :
'en'),
$this->getKeyword());
}
Here is the call graph for this function:| ilMDKeyword::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 80 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId().
{
global $ilDB;
if($this->getMetaId())
{
if($this->db->autoExecute('il_meta_keyword',
$this->__getFields(),
DB_AUTOQUERY_UPDATE,
"meta_keyword_id = ".$ilDB->quote($this->getMetaId())))
{
return true;
}
}
return false;
}
Here is the call graph for this function:| ilMDKeyword::update | ( | ) |
Reimplemented from ilMDBase.
Definition at line 80 of file class.ilMDKeyword.php.
References ilMDBase::getMetaId().
{
global $ilDB;
if($this->getMetaId())
{
if($this->db->autoExecute('il_meta_keyword',
$this->__getFields(),
DB_AUTOQUERY_UPDATE,
"meta_keyword_id = ".$ilDB->quote($this->getMetaId())))
{
return true;
}
}
return false;
}
Here is the call graph for this function:
1.7.1