Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
abe63bd3
Commit
abe63bd3
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Add occ command to list all apps
parent
fc1d897e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/command/app/listapps.php
+47
-0
47 additions, 0 deletions
core/command/app/listapps.php
core/register_command.php
+1
-0
1 addition, 0 deletions
core/register_command.php
with
48 additions
and
0 deletions
core/command/app/listapps.php
0 → 100644
+
47
−
0
View file @
abe63bd3
<?php
/**
* Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace
OC\Core\Command\App
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Input\InputInterface
;
use
Symfony\Component\Console\Output\OutputInterface
;
class
ListApps
extends
Command
{
protected
function
configure
()
{
$this
->
setName
(
'app:list'
)
->
setDescription
(
'List all available apps'
);
}
protected
function
execute
(
InputInterface
$input
,
OutputInterface
$output
)
{
$apps
=
\OC_App
::
getAllApps
();
$enabledApps
=
array
();
$disabledApps
=
array
();
//sort enabled apps above disabled apps
foreach
(
$apps
as
$app
)
{
if
(
\OC_App
::
isEnabled
(
$app
))
{
$enabledApps
[]
=
$app
;
}
else
{
$disabledApps
[]
=
$app
;
}
}
sort
(
$enabledApps
);
sort
(
$disabledApps
);
$output
->
writeln
(
'Enabled:'
);
foreach
(
$enabledApps
as
$app
)
{
$output
->
writeln
(
' - '
.
$app
);
}
$output
->
writeln
(
'Disabled:'
);
foreach
(
$disabledApps
as
$app
)
{
$output
->
writeln
(
' - '
.
$app
);
}
}
}
This diff is collapsed.
Click to expand it.
core/register_command.php
+
1
−
0
View file @
abe63bd3
...
@@ -12,3 +12,4 @@ $application->add(new OC\Core\Command\Db\GenerateChangeScript());
...
@@ -12,3 +12,4 @@ $application->add(new OC\Core\Command\Db\GenerateChangeScript());
$application
->
add
(
new
OC\Core\Command\Upgrade
());
$application
->
add
(
new
OC\Core\Command\Upgrade
());
$application
->
add
(
new
OC\Core\Command\App\Disable
());
$application
->
add
(
new
OC\Core\Command\App\Disable
());
$application
->
add
(
new
OC\Core\Command\App\Enable
());
$application
->
add
(
new
OC\Core\Command\App\Enable
());
$application
->
add
(
new
OC\Core\Command\App\ListApps
());
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment