本文整理汇总了PHP中Package::getInstalledList方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::getInstalledList方法的具体用法?PHP Package::getInstalledList怎么用?PHP Package::getInstalledList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::getInstalledList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRemotelyUpgradeablePackages
public static function getRemotelyUpgradeablePackages()
{
$packages = Package::getInstalledList();
$upgradeables = array();
$db = Loader::db();
foreach ($packages as $p) {
if (version_compare($p->getPackageVersion(), $p->getPackageVersionUpdateAvailable(), '<')) {
$upgradeables[] = $p;
}
}
return $upgradeables;
}
示例2: t
<div class="spacer-row-5"></div>
<a name="addons"></a>
<a href="<?php
echo URL::to('/dashboard/extend/update');
?>
" class="btn btn-default pull-right btn-xs "><?php
echo t('Update Add-Ons');
?>
</a>
<h3><?php
echo t('Add-On Compatibility');
?>
</h3>
<?php
$list = \Package::getInstalledList();
$ci = Core::make('helper/concrete/urls');
if (count($list) == 0) {
?>
<p><?php
echo t('No add-ons installed.');
?>
</p>
<?php
}
foreach ($list as $pkg) {
?>
<div class="media" data-addon="<?php
echo $pkg->getPackageHandle();
示例3: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$valt = Loader::helper('validation/token');
$ci = Loader::helper('concrete/urls');
$ch = Loader::helper('concrete/ui');
$tp = new TaskPermission();
if ($tp->canInstallPackages()) {
$mi = Marketplace::getInstance();
}
$pkgRemote = array();
$pkgLocal = array();
if (Config::get('concrete.marketplace.enabled') && is_object($mi)) {
if ($mi->isConnected()) {
$pkgArray = Package::getInstalledList();
foreach ($pkgArray as $pkg) {
if ($pkg->isPackageInstalled() && version_compare($pkg->getPackageVersion(), $pkg->getPackageVersionUpdateAvailable(), '<')) {
$pkgRemote[] = $pkg;
}
}
}
}
$pkgAvailableArray = Package::getLocalUpgradeablePackages();
foreach ($pkgAvailableArray as $pkg) {
if (!in_array($pkg, $pkgRemote)) {
$pkgLocal[] = $pkg;
}
}
?>
<?php
echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Update Add-Ons'));
示例4: execute
public function execute()
{
$params = $this->params;
$params['version'] = APP_VERSION;
$params['itemsPerPage'] = $this->itemsPerPage;
Loader::library("marketplace");
$mi = Marketplace::getInstance();
$params['csToken'] = $mi->getSiteToken();
if ($this->includeInstalledItems) {
$params['includeInstalledItems'] = 1;
} else {
$params['includeInstalledItems'] = 0;
$list = Package::getInstalledList();
foreach ($list as $pkg) {
$params['installedPackages'][] = $pkg->getPackageHandle();
}
}
if (isset($_REQUEST[$this->queryStringPagingVariable])) {
$params[$this->queryStringPagingVariable] = $_REQUEST[$this->queryStringPagingVariable];
}
$uh = Loader::helper('url');
$url = $uh->buildQuery(MARKETPLACE_REMOTE_ITEM_LIST_WS . $this->type . '/-/get_remote_list', $params);
$r = Loader::helper('file')->getContents($url);
$r2 = @Loader::helper('json')->decode($r);
$total = 0;
$items = array();
if (is_object($r2)) {
$items = $r2->items;
$total = $r2->total;
}
$this->total = $total;
$this->setItems($items);
}