当前位置: 首页>>代码示例>>PHP>>正文


PHP Package::getInstalledList方法代码示例

本文整理汇总了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;
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:12,代码来源:package.php

示例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();
开发者ID:ceko,项目名称:concrete5-1,代码行数:31,代码来源:update.php

示例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'));
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:31,代码来源:update.php

示例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);
 }
开发者ID:ronlobo,项目名称:concrete5-de,代码行数:33,代码来源:marketplace_remote_item.php


注:本文中的Package::getInstalledList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。