Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
TODO コメントを整理
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Apr 16, 2023
1 parent 086a06c commit b6bce5c
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SiteConfigsController extends BcAdminAppController
*
* @var array
*/
// TODO 未実装のため代替措置
// TODO ucmitz 未実装のため代替措置
/* >>>
public $components = ['BcManager'];
<<< */
Expand Down
2 changes: 1 addition & 1 deletion plugins/baser-core/src/Middleware/BcAssetDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function process(
*
* @param string $url URL
* @return string|null Absolute path for asset file
* TODO ucmitz 一旦、スキップ
* @TODO ucmitz 一旦、スキップ
*/
// protected function _getAssetFile($url)
// {
Expand Down
35 changes: 17 additions & 18 deletions plugins/baser-core/src/Model/Table/AppTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
* @param array $fieldList List of fields to allow to be written
* @return mixed On success Model::$data if its not empty or true, false on failure
*/
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
public function save($data = null, $validate = true, $fieldList = [])
{
Expand Down Expand Up @@ -214,12 +214,11 @@ public function save($data = null, $validate = true, $fieldList = [])
/**
* 配列の文字コードを変換する
*
* TODO GLOBAL グローバルな関数として再配置する必要あり
*
* @param array $data 変換前のデータ
* @param string $outenc 変換後の文字コード
* @param string $inenc 変換元の文字コード
* @return array 変換後のデータ
* @TODO GLOBAL グローバルな関数として再配置する必要あり
*/
public function convertEncodingByArray($data, $outenc, $inenc)
{
Expand All @@ -243,7 +242,7 @@ public function convertEncodingByArray($data, $outenc, $inenc)
*/
public function saveDbLog($message)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
// ログを記録する
$Dblog = ClassRegistry::init('Dblog');
Expand Down Expand Up @@ -276,7 +275,7 @@ public function getControlSource($field)
*/
public function getChildIdsList($id)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
$ids = [];
if ($this->childCount($id)) {
Expand All @@ -297,7 +296,7 @@ public function getChildIdsList($id)
*
* @param string 変換対象文字列
* @return string 変換後文字列
* TODO AppExModeに移行すべきかも
* @TODO AppExModeに移行すべきかも
*/
public function replaceText($str)
{
Expand Down Expand Up @@ -387,7 +386,7 @@ public function replaceText($str)
*/
public function loadSchema($dbConfigName, $path, $filterTable = '', $filterType = '', $excludePath = [], $dropField = true)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
// テーブルリストを取得
$db = ConnectionManager::get($dbConfigName);
Expand Down Expand Up @@ -459,7 +458,7 @@ public function loadSchema($dbConfigName, $path, $filterTable = '', $filterType
*/
public function loadCsv($dbConfigName, $path, $options = [])
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
$options = array_merge([
'filterTable' => ''
Expand Down Expand Up @@ -536,7 +535,7 @@ public function getMax(string $field, array $conditions = []): int
public function addField($options)
{
return true;
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
extract($options);
Expand Down Expand Up @@ -566,7 +565,7 @@ public function addField($options)
*/
public function editField($options)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
extract($options);
Expand Down Expand Up @@ -597,7 +596,7 @@ public function editField($options)
public function delField($options)
{
return true;
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
extract($options);
Expand Down Expand Up @@ -628,7 +627,7 @@ public function delField($options)
*/
public function renameField($options)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
extract($options);
Expand Down Expand Up @@ -657,7 +656,7 @@ public function renameField($options)
*/
public function tableExists($tableName)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz ucmitz 未実装の為コメントアウト
/* >>>
$db = ConnectionManager::get($this->useDbConfig);
$db->cacheSources = false;
Expand Down Expand Up @@ -998,7 +997,7 @@ public function deleteAll($conditions): int
{
$result = parent::deleteAll($conditions);
if ($result) {
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
if ($this->Behaviors->attached('BcCache') && $this->Behaviors->enabled('BcCache')) {
$this->delCache($this);
Expand All @@ -1015,7 +1014,7 @@ public function updateAll($fields, $conditions): int
{
$result = parent::updateAll($fields, $conditions);
if ($result) {
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
if ($this->Behaviors->attached('BcCache') && $this->Behaviors->enabled('BcCache')) {
$this->delCache($this);
Expand Down Expand Up @@ -1113,7 +1112,7 @@ public function find(string $type = 'all', array $options = []): Query

return $this->callFinder($type, $query, $options);

// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
// CUSTOMIZE MODIFY 2012/04/23 ryuring
// キャッシュビヘイビアが利用状態の場合、モデルデータキャッシュを読み込む
Expand Down Expand Up @@ -1172,7 +1171,7 @@ public function find(string $type = 'all', array $options = []): Query
*/
public function isPublish($status, $publishBegin, $publishEnd)
{
// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
$Content = ClassRegistry::init('Content');
return $Content->isPublish($status, $publishBegin, $publishEnd);
Expand All @@ -1186,7 +1185,7 @@ public function exists($conditions): bool
{
return parent::exists($conditions);

// TODO 未実装の為コメントアウト
// TODO ucmitz 未実装の為コメントアウト
/* >>>
if ($this->Behaviors->loaded('SoftDelete')) {
return $this->existsAndNotDeleted($id);
Expand Down
2 changes: 1 addition & 1 deletion plugins/baser-core/src/Model/Table/ContentsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function validationDefault(Validator $validator): Validator
*/
public function duplicateRelatedSiteContent($check)
{
// TODO: 代替措置
// TODO ucmitz 代替措置
// if (!$this->Sites->isMain($this->data['Content']['site_id'])) {
// return true;
// }
Expand Down
2 changes: 1 addition & 1 deletion plugins/baser-core/src/Model/Table/PermissionsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
* @param int $id
* @param array $data
* @return mixed $permission | false
* TODO: copyをServiceに移行する
* @TODO: copyをServiceに移行する
* @checked
* @noTodo
* @unitTest
Expand Down
1 change: 0 additions & 1 deletion plugins/baser-core/src/Model/Table/SitesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ public function getRootContentId($id)

/**
* URLよりサイトを取得する
* TODO: テストがエラーになる
*
* @param string $url
* @return EntityInterface
Expand Down
3 changes: 1 addition & 2 deletions plugins/baser-core/src/Service/ContentsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ public function getContentsInfo()

/**
* ツリー構造より論理削除する
* TODO: キャッシュビヘイビアー実装後復活させる
*
* @param $id
* @return bool
Expand All @@ -673,7 +672,7 @@ public function getContentsInfo()
*/
public function softDeleteFromTree($id)
{
// TODO: キャッシュ系が有効化されてからsoftDeleteFromTreeを使用する
// TODO ucmitz キャッシュ系が有効化されてからsoftDeleteFromTreeを使用する
$this->softDelete(true);
$this->Behaviors->unload('BcCache');
$this->Behaviors->unload('BcUpload');
Expand Down
8 changes: 4 additions & 4 deletions plugins/baser-core/src/View/Helper/BcBaserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class BcBaserHelper extends Helper
*
* @var array
*/
// TODO 取り急ぎ動作させるために追加
// TODO ucmitz 取り急ぎ動作させるために追加
// >>>
// public $siteConfig = [];
public $siteConfig = [
Expand Down Expand Up @@ -223,7 +223,7 @@ public function __construct(View $View, $settings = [])
parent::__construct($View, $settings);

// サイト基本設定データをセット
// TODO 未実装
// TODO ucmitz 未実装
/* >>>
if (BcUtil::isInstalled() || isConsole()) {
$this->siteConfig = $this->_View->get('siteConfig', []);
Expand Down Expand Up @@ -2095,11 +2095,11 @@ public function isCategoryTop()
* @param array $params 固定ページに引き継ぐパラメータ(初期値 : array())
* @param array $options オプション(初期値 : array())
* - `loadHelpers` : ヘルパーを読み込むかどうか(初期値 : false)
* todo loadHelpersが利用されていないのをなんとかする
* - `subDir` : テンプレートの配置場所についてプレフィックスに応じたサブフォルダを利用するかどうか(初期値 : true)
* - `recursive` : 固定ページ読み込みを再帰的に読み込むかどうか(初期値 : true)
* - `checkExists` : 固定ページの存在判定をするかどうか(初期値 : true)
* @return void
* @todo ucmitz loadHelpersが利用されていないのをなんとかする
*/
public function page($url, $params = [], $options = [])
{
Expand Down Expand Up @@ -2623,7 +2623,7 @@ public function relatedSiteLinks($id = null, $excludeIds = [])
*/
public function afterRender($viewFile)
{
// TODO 未実装
// TODO ucmitz 未実装
// >>>
return;
// <<<
Expand Down
2 changes: 1 addition & 1 deletion plugins/baser-core/src/View/Helper/BcContentsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function _getExistsTitles()
}
}
}
// TODO: SoftDelete未実装
// TODO ucmitz SoftDelete未実装
// $this->_Contents->Behaviors->unload('SoftDelete');
$contents = $this->_Contents->find('all')->select(['plugin', 'type', 'title'])->where([$conditions]);
// $this->_Contents->Behaviors->load('SoftDelete');
Expand Down
3 changes: 1 addition & 2 deletions plugins/baser-core/src/View/Helper/BcFreezeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ public function file($fieldName, $options = []): string

/**
* ファイルコントロール(画像)を表示する
* TODO 確認画面には未チェック
*
* @param string $fieldName フィールド文字列
* @param array $attributes html属性
Expand Down Expand Up @@ -532,11 +531,11 @@ public function password($fieldName, $attributes = [])

/**
* JsonList
* TODO 確認画面用の実装は全くしてない
*
* @param string $fieldName フィールド文字列
* @param array $attributes html属性
* @return string htmlタグ
* @TODO ucmitz 確認画面用の実装は全くしてない
*/
public function jsonList($fieldName, $attributes)
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/baser-core/src/View/Helper/BcListTableHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getColumnNumber()
public function dispatchShowHead()
{

// TODO 未実装のため代替措置
// TODO ucmitz 未実装のため代替措置
// >>>
return '';
// <<<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,6 @@ public function testResetTree()
/**
* URLからコンテンツを取得する
*
* TODO sameUrl / useSubDomain のテストが書けていない
* Siteのデータを用意する必要がある
*
* @param string $url
Expand All @@ -1052,6 +1051,7 @@ public function testResetTree()
* @param bool $useSubDomain
* @param bool $expected
* @dataProvider findByUrlDataProvider
* @TODO sameUrl / useSubDomain のテストが書けていない
*/
public function testFindByUrl($expected, $url, $publish = true, $extend = false, $sameUrl = false, $useSubDomain = false)
{
Expand Down
1 change: 0 additions & 1 deletion plugins/baser-core/tests/TestCase/Utility/BcUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use Cake\Http\Session;

/**
* TODO: $this->getRequest();などをsetupに統一する
* Class BcUtilTest
*/
class BcUtilTest extends BcTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ public function getUrlDataProvider()
];
}

/**************** TODO:下記basercms4系より移行 メソッドが準備され次第 調整して上記のテストコードに追加してください ********************/
/**************** TODO ucmitz :下記basercms4系より移行 メソッドが準備され次第 調整して上記のテストコードに追加してください ********************/

/**
* ログイン状態にする
Expand Down Expand Up @@ -1579,13 +1579,14 @@ public function markDataProvider()

/**
* サイトマップを出力する
* TODO : 階層($recursive)を指定した場合のテスト
*
* @param mixed $pageCategoryId 固定ページカテゴリID(初期値 : null)
* - 0 : 仕様確認要
* - null : 仕様確認要
* @param string $recursive 取得する階層
* @param boolean $expected 期待値
* @dataProvider getSitemapDataProvider
* @TODO : 階層($recursive)を指定した場合のテスト
*/

public function testGetSitemap($siteId, $expected)
Expand Down Expand Up @@ -1964,10 +1965,11 @@ public function testGetGoogleMaps()

/**
* 表示件数設定機能を出力する
* TODO ryuring 現在の資料として、Contents テーブルで管理しているURLの場合、URLが解決できない
*
* BcContentsRoute::match() に途中までの処理を記述している
*
* @return void
* @TODO 現在の仕様として、Contents テーブルで管理しているURLの場合、URLが解決できない
*/
public function testListNum()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ public function fileDataProvider()

/**
* ファイルコントロール(画像)を表示する
* TODO 確認画面には未チェック
*
* @param boolean $freezed フォームを凍結させる
* @param string $name $this->request->data[$model][$field]['name']に格納する値
Expand All @@ -358,6 +357,7 @@ public function fileDataProvider()
* @param array $imageAttributes 画像属性
* @param string $expexted 期待値
* @dataProvider imageDataProvider
* @TODO 確認画面には未チェック
*/
public function testImage($freezed, $name, $exist, $fieldName, $attributes, $imageAttributes, $expected)
{
Expand Down Expand Up @@ -393,14 +393,14 @@ public function imageDataProvider()

/**
* JsonList
* TODO 確認画面用の実装は全くしてない
*
* @param boolean $freezed フォームを凍結させる
* @param array $data 凍結させたjsonのデータ
* @param string $fieldName フィールド文字列
* @param array $attributes html属性
* @param string $expexted 期待値
* @dataProvider jsonListDataProvider
* @TODO 確認画面用の実装は全くしてない
*/
public function testJsonList($freezed, $data, $fieldName, $attributes, $expected)
{
Expand Down

0 comments on commit b6bce5c

Please sign in to comment.