本文整理汇总了PHP中Concrete\Core\Package\PackageList::getHandle方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageList::getHandle方法的具体用法?PHP PackageList::getHandle怎么用?PHP PackageList::getHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Concrete\Core\Package\PackageList
的用法示例。
在下文中一共展示了PackageList::getHandle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPackageHandle
/**
* Get the package handle (or false if it's a core library).
*
* @return string|false
*/
public function getPackageHandle()
{
if (!isset($this->pkgHandle)) {
$this->pkgHandle = $this->pkgID ? PackageList::getHandle($this->pkgID) : false;
}
return $this->pkgHandle;
}
示例2: getByHandle
public static function getByHandle($ptPublishTargetTypeHandle)
{
$db = Loader::db();
$r = $db->GetRow('select ptPublishTargetTypeID, ptPublishTargetTypeHandle, ptPublishTargetTypeName, pkgID from PageTypePublishTargetTypes where ptPublishTargetTypeHandle = ?', array($ptPublishTargetTypeHandle));
if (is_array($r) && $r['ptPublishTargetTypeHandle']) {
$txt = Loader::helper('text');
$class = overrideable_core_class('Core\\Page\\Type\\PublishTarget\\Type\\' . $txt->camelcase($r['ptPublishTargetTypeHandle']) . 'Type', DIRNAME_CLASSES . '/Page/Type/PublishTarget/Type/' . $txt->camelcase($r['ptPublishTargetTypeHandle']) . '.php', PackageList::getHandle($r['pkgID']));
$sc = Core::make($class);
$sc->setPropertiesFromArray($r);
return $sc;
}
}
示例3: getByHandle
public static function getByHandle($scsHandle)
{
$db = Loader::db();
$r = $db->GetRow('select scsHandle, scsIsActive, pkgID, scsName from SystemContentEditorSnippets where scsHandle = ?', array($scsHandle));
if (is_array($r) && $r['scsHandle']) {
$pkgHandle = false;
if ($r['pkgID']) {
$pkgHandle = PackageList::getHandle($r['pkgID']);
}
$class = overrideable_core_class('Core\\Editor\\' . camelcase($r['scsHandle']) . 'Snippet', DIRNAME_CLASSES . '/Editor/' . camelcase($r['scsHandle']) . 'Snippet.php', $pkgHandle);
$sc = Core::make($class);
$sc->setPropertiesFromArray($r);
return $sc;
}
}
示例4: getByHandle
public static function getByHandle($scsHandle)
{
$db = Loader::db();
$r = $db->GetRow('select scsHandle, scsIsActive, pkgID, scsName from SystemContentEditorSnippets where scsHandle = ?', array($scsHandle));
if (is_array($r) && $r['scsHandle']) {
$pkgHandle = false;
if ($r['pkgID']) {
$pkgHandle = PackageList::getHandle($r['pkgID']);
}
$txt = Loader::helper('text');
$class = '\\Concrete\\Core\\Editor\\' . $txt->camelcase($r['scsHandle']) . 'Snippet';
$sc = Core::make($class);
$sc->setPropertiesFromArray($r);
return $sc;
}
}
示例5: getPackageHandle
public function getPackageHandle()
{
return PackageList::getHandle($this->pkgID);
}
示例6: getPackageHandle
public function getPackageHandle()
{
return \Concrete\Core\Package\PackageList::getHandle($this->pkgID);
}
示例7: getAttributeKeyByID
/**
* @param int $akID
* @return Key|false Returns an attribute key for the matching ID,
* false if no key exists for the category with the given ID
*/
public function getAttributeKeyByID($akID)
{
$txt = Core::make('helper/text');
$prefix = $this->pkgID > 0 ? PackageList::getHandle($this->pkgID) : false;
$akCategoryHandle = $txt->camelcase($this->akCategoryHandle);
$className = core_class('Core\\Attribute\\Key\\' . $akCategoryHandle . 'Key', $prefix);
$ak = call_user_func(array($className, 'getByID'), $akID);
return $ak;
}
示例8: getByID
public static function getByID($wpID)
{
$db = Database::connection();
$r = $db->fetchAssoc('select WorkflowProgress.*, WorkflowProgressCategories.wpCategoryHandle, WorkflowProgressCategories.pkgID from WorkflowProgress inner join WorkflowProgressCategories on WorkflowProgress.wpCategoryID = WorkflowProgressCategories.wpCategoryID where wpID = ?', array($wpID));
if (!is_array($r) || !$r['wpID']) {
return false;
}
$class = '\\Core\\Workflow\\Progress\\' . Core::make('helper/text')->camelcase($r['wpCategoryHandle']) . 'Progress';
if ($r['pkgID']) {
$pkgHandle = PackageList::getHandle($r['pkgID']);
}
$class = core_class($class, $pkgHandle);
$wp = Core::make($class);
$wp->setPropertiesFromArray($r);
$wp->loadDetails();
return $wp;
}
示例9: getJobObjByHandle
public static function getJobObjByHandle($jHandle = '', $jobData = array())
{
$jcl = static::jobClassLocations();
$pkgHandle = null;
//check for the job file in the various locations
$db = Loader::db();
$pkgID = $db->GetOne('select pkgID from Jobs where jHandle = ?', $jHandle);
if ($pkgID > 0) {
$pkgHandle = PackageList::getHandle($pkgID);
if ($pkgHandle) {
$jcl[] = DIR_PACKAGES . '/' . $pkgHandle . '/' . DIRNAME_JOBS;
$jcl[] = DIR_PACKAGES_CORE . '/' . $pkgHandle . '/' . DIRNAME_JOBS;
}
}
foreach ($jcl as $jobClassLocation) {
//load the file & class, then run the job
$path = $jobClassLocation . '/' . $jHandle . '.php';
if (file_exists($path)) {
$className = static::getClassName($jHandle, $pkgHandle);
$j = Core::make($className);
$j->jHandle = $jHandle;
if (intval($jobData['jID']) > 0) {
$j->setPropertiesFromArray($jobData);
}
return $j;
}
}
return NULL;
}
示例10: mapAuthenticationTypeFilePath
/**
* Return the first existing file path in this order:
* - /models/authentication/types/HANDLE
* - /packages/PKGHANDLE/authentication/types/HANDLE
* - /concrete/models/authentication/types/HANDLE
* - /concrete/core/models/authentication/types/HANDLE
*
* @param string $_file The filename you want.
* @return string This will return false if the file is not found.
*/
protected function mapAuthenticationTypeFilePath($_file)
{
$atHandle = $this->getAuthenticationTypeHandle();
$env = Environment::get();
$pkgHandle = PackageList::getHandle($this->pkgID);
$r = $env->getRecord(implode('/', array(DIRNAME_AUTHENTICATION, $atHandle, $_file)), $pkgHandle);
return $r;
}