Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
36ed709e
Commit
36ed709e
authored
Mar 21, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2840 from schmunk42/feature/apidoc
Minor apidoc updates
parents
44d9d0da
0cd46260
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
apidoc
extensions/apidoc/apidoc
+22
-21
api.php
extensions/apidoc/templates/bootstrap/layouts/api.php
+1
-1
No files found.
extensions/apidoc/apidoc
View file @
36ed709e
...
...
@@ -11,43 +11,44 @@
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
false
);
$composerAutoload
=
[
__DIR__
.
'/vendor/autoload.php'
,
// standalone with "composer install" run
__DIR__
.
'/../../autoload.php'
,
// script is installed as a composer binary
__DIR__
.
'/vendor/autoload.php'
,
// standalone with "composer install" run
__DIR__
.
'/../../autoload.php'
,
// script is installed as a composer binary
__DIR__
.
'/../../../../autoload.php'
,
// script is run from yii2-dev/extensions
];
$vendorPath
=
null
;
foreach
(
$composerAutoload
as
$autoload
)
{
if
(
file_exists
(
$autoload
))
{
require
(
$autoload
);
$vendorPath
=
dirname
(
$autoload
);
break
;
}
if
(
file_exists
(
$autoload
))
{
require
(
$autoload
);
$vendorPath
=
dirname
(
$autoload
);
break
;
}
}
$yiiDirs
=
[
__DIR__
.
'/../../framework'
,
// in yii2-dev repo
__DIR__
.
'/vendor/yiisoft/yii2'
,
// standalone with "composer install" run
__DIR__
.
'/../../yiisoft/yii2'
,
// script is installed as a composer binary
__DIR__
.
'/../../framework'
,
// in yii2-dev repo
__DIR__
.
'/vendor/yiisoft/yii2'
,
// standalone with "composer install" run
__DIR__
.
'/../../yiisoft/yii2'
,
// script is installed as a composer binary
];
foreach
(
$yiiDirs
as
$dir
)
{
if
(
file_exists
(
$dir
.
'/Yii.php'
))
{
require
(
$dir
.
'/Yii.php'
);
break
;
}
if
(
file_exists
(
$dir
.
'/Yii.php'
))
{
require
(
$dir
.
'/Yii.php'
);
break
;
}
}
if
(
!
class_exists
(
'Yii'
))
{
echo
PHP_EOL
.
"The Yii Framework 2.0 does not seem to be installed. Try running composer install."
.
PHP_EOL
.
PHP_EOL
;
exit
(
1
);
echo
PHP_EOL
.
"The Yii Framework 2.0 does not seem to be installed. Try running composer install."
.
PHP_EOL
.
PHP_EOL
;
exit
(
1
);
}
Yii
::
setAlias
(
'@yii/apidoc'
,
__DIR__
);
$application
=
new
yii\console\Application
([
'id'
=>
'yii2-apidoc'
,
'basePath'
=>
__DIR__
,
'enableCoreCommands'
=>
false
,
'controllerNamespace'
=>
'yii\\apidoc\\commands'
,
'id'
=>
'yii2-apidoc'
,
'basePath'
=>
__DIR__
,
'enableCoreCommands'
=>
false
,
'controllerNamespace'
=>
'yii\\apidoc\\commands'
,
]);
if
(
$vendorPath
!==
null
)
{
$application
->
setVendorPath
(
$vendorPath
);
$application
->
setVendorPath
(
$vendorPath
);
}
$exitCode
=
$application
->
run
();
exit
(
$exitCode
);
extensions/apidoc/templates/bootstrap/layouts/api.php
View file @
36ed709e
...
...
@@ -15,7 +15,7 @@ $renderer = $this->context;
$this
->
beginContent
(
'@yii/apidoc/templates/bootstrap/layouts/main.php'
);
?>
<div
class=
"row"
>
<div
class=
"col-md-
2
"
>
<div
class=
"col-md-
3
"
>
<?php
$types
=
$renderer
->
getNavTypes
(
isset
(
$type
)
?
$type
:
null
,
$types
);
ksort
(
$types
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment