Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use just `path` field

  • Loading branch information...
commit 12ba153b43abab589c474d99cfacad6a59c3e5d4 1 parent 217aa19
@luku authored
View
4 Config/Schema/api_generator.php
@@ -55,7 +55,7 @@ class ApiGeneratorSchema extends CakeSchema {
public $api_packages = array(
'id' => array('type' => 'string', 'default' => NULL, 'length' => 36, 'null' => false, 'key' => 'primary'),
'parent_id' => array('type' => 'string', 'default' => NULL, 'length' => 36, 'null' => true, 'key' => 'index'),
- 'package_path' => array('type' => 'string', 'null' => false, 'length' => 500, 'key' => 'index'),
+ 'path' => array('type' => 'string', 'null' => false, 'length' => 500, 'key' => 'index'),
'name' => array('type' => 'string', 'length' => 255, 'null' => false),
'slug' => array('type' => 'string', 'length' => 255, 'null' => false),
'lft' => array('type' => 'integer'),
@@ -65,7 +65,7 @@ class ApiGeneratorSchema extends CakeSchema {
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => true),
'parent_id' => array('column' => 'parent_id', 'unique' => false),
- 'package_path' => array('column' => 'package_path', 'unique' => false),
+ 'path' => array('column' => 'path', 'unique' => false),
)
);
}
View
2  Model/ApiPackage.php
@@ -113,7 +113,7 @@ public function updatePackageTree($packages) {
$new = array(
'ApiPackage' => array(
'parent_id' => $parentId,
- 'package_path' => $this->makePath($path),
+ 'path' => $this->makePath($path),
'slug' => $slug,
'name' => $package
)
View
12 Test/Fixture/ApiPackageFixture.php
@@ -22,7 +22,7 @@ class ApiPackageFixture extends CakeTestFixture {
var $fields = array(
'id' => array('type' => 'string', 'default' => NULL, 'length' => 36, 'null' => false, 'key' => 'primary'),
'parent_id' => array('type' => 'string', 'default' => NULL, 'length' => 36),
- 'package_path' => array('type' => 'string', 'null' => false, 'length' => 500),
+ 'path' => array('type' => 'string', 'null' => false, 'length' => 500),
'name' => array('type' => 'string', 'length' => 255, 'null' => false),
'slug' => array('type' => 'string', 'length' => 255, 'null' => false),
'lft' => array('type' => 'integer'),
@@ -35,7 +35,7 @@ class ApiPackageFixture extends CakeTestFixture {
array(
'id' => 1,
'parent_id' => null,
- 'package_path' => 'cake',
+ 'path' => 'cake',
'name' => 'cake',
'slug' => 'cake',
'lft' => 1,
@@ -46,7 +46,7 @@ class ApiPackageFixture extends CakeTestFixture {
array(
'id' => 2,
'parent_id' => 1,
- 'package_path' => 'cake/controller',
+ 'path' => 'cake/controller',
'name' => 'controller',
'slug' => 'controller',
'lft' => 2,
@@ -57,7 +57,7 @@ class ApiPackageFixture extends CakeTestFixture {
array(
'id' => 3,
'parent_id' => 2,
- 'package_path' => 'cake/controller/component',
+ 'path' => 'cake/controller/component',
'name' => 'component',
'slug' => 'component',
'lft' => 3,
@@ -68,7 +68,7 @@ class ApiPackageFixture extends CakeTestFixture {
array(
'id' => 4,
'parent_id' => 1,
- 'package_path' => 'cake/model',
+ 'path' => 'cake/model',
'name' => 'model',
'slug' => 'model',
'lft' => 6,
@@ -79,7 +79,7 @@ class ApiPackageFixture extends CakeTestFixture {
array(
'id' => 5,
'parent_id' => 4,
- 'package_path' => 'cake/model/behavior',
+ 'path' => 'cake/model/behavior',
'name' => 'behavior',
'slug' => 'behavior',
'lft' => 7,
View
2  View/ApiPackages/json/view.ctp
@@ -7,7 +7,7 @@ foreach ($apiPackage['ChildPackage'] as $child) {
'name' => $child['name'],
'url' => $this->ApiDoc->packageUrl(
$child['name'],
- array_merge($this->ApiDoc->path($child['package_path']), array('ext' => 'json'))
+ array_merge($this->ApiDoc->path($child['path']), array('ext' => 'json'))
)
);
}
View
4 View/ApiPackages/view.ctp
@@ -10,7 +10,7 @@ $this->ApiDoc->setClassIndex($classIndex);
<li>
<?php echo $this->ApiDoc->packageLink(
$apiPackage['ParentPackage']['name'],
- $this->ApiDoc->path($apiPackage['ParentPackage']['package_path'])
+ $this->ApiDoc->path($apiPackage['ParentPackage']['path'])
); ?>
</li>
</ul>
@@ -23,7 +23,7 @@ $this->ApiDoc->setClassIndex($classIndex);
<li>
<?php echo $this->ApiDoc->packageLink(
$child['name'],
- $this->ApiDoc->path($child['package_path'])
+ $this->ApiDoc->path($child['path'])
); ?>
</li>
<?php endforeach; ?>
View
4 View/Helper/ApiDocHelper.php
@@ -306,7 +306,7 @@ public function generatePackageTree($packageTree, $depth = 0) {
$out = '<ul class="package-tree depth-'. $depth . '">' . "\n";
foreach ($packageTree as $branch) {
$children = null;
- $link = $this->packageLink($branch['ApiPackage']['name'], $this->path($branch['ApiPackage']['package_path']));
+ $link = $this->packageLink($branch['ApiPackage']['name'], $this->path($branch['ApiPackage']['path']));
if (!empty($branch['children'])) {
$depth++;
$children = $this->generatePackageTree($branch['children'], $depth);
@@ -327,7 +327,7 @@ public function generatePackageJsonTree($packageTree) {
$out = array();
foreach ($packageTree as $branch) {
$children = array();
- $url = $this->packageUrl($branch['ApiPackage']['name'], $this->path($branch['ApiPackage']['package_path']));
+ $url = $this->packageUrl($branch['ApiPackage']['name'], $this->path($branch['ApiPackage']['path']));
if (!empty($branch['children'])) {
$children = $this->generatePackageJsonTree($branch['children']);
}
Please sign in to comment.
Something went wrong with that request. Please try again.