本文整理匯總了PHP中eZContentClassAttribute::classAttributeIDByIdentifier方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentClassAttribute::classAttributeIDByIdentifier方法的具體用法?PHP eZContentClassAttribute::classAttributeIDByIdentifier怎麽用?PHP eZContentClassAttribute::classAttributeIDByIdentifier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZContentClassAttribute
的用法示例。
在下文中一共展示了eZContentClassAttribute::classAttributeIDByIdentifier方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: classAttributeIDByIdentifier
/**
* Returns the ID of the class attribute with the given ID or false if no class/attribute by that identifier
* is found. If multiple classes have the same identifier, the first found is returned.
*
* @param string $identifier
* @return int|bool
*/
static function classAttributeIDByIdentifier($identifier)
{
return eZContentClassAttribute::classAttributeIDByIdentifier($identifier);
}
示例2: keyword
public static function keyword($params)
{
$sqlTables = '';
$sqlJoins = '';
$keyword = isset($params['keyword']) ? $params['keyword'] : false;
$attribute = isset($params['attribute']) ? $params['attribute'] : false;
if ($keyword === false && is_string($keyword) && $keyword != '') {
return array();
}
$db = eZDB::instance();
$sqlKeyword = $db->escapeString($keyword);
$sqlJoins .= 'coa_related_by_keyword' . $params['index'] . '.contentobject_id = ezcontentobject.id AND ' . 'coa_related_by_keyword' . $params['index'] . '.version = ezcontentobject.current_version AND ';
$sqlJoins .= eZContentLanguage::sqlFilter('coa_related_by_keyword' . $params['index'], 'ezcontentobject') . ' AND ';
if ($attribute !== false) {
$attributeID = eZContentClassAttribute::classAttributeIDByIdentifier($attribute);
if ($attributeID) {
$sqlJoins .= 'coa_related_by_keyword' . $params['index'] . '.contentclassattribute_id = ' . $attributeID . ' AND ';
}
}
$sqlJoins .= 'coa_related_by_keyword' . $params['index'] . '.id = kal_related_by_keyword' . $params['index'] . '.objectattribute_id AND ' . 'kal_related_by_keyword' . $params['index'] . '.keyword_id = k_related_by_keyword' . $params['index'] . '.id AND ';
$sqlJoins .= 'k_related_by_keyword' . $params['index'] . ".keyword = '" . $sqlKeyword . "' AND";
$sqlTables .= ', ezcontentobject_attribute coa_related_by_keyword' . $params['index'] . ', ' . 'ezkeyword_attribute_link kal_related_by_keyword' . $params['index'] . ', ' . 'ezkeyword k_related_by_keyword' . $params['index'];
return array('tables' => $sqlTables, 'joins' => $sqlJoins);
}