diff --git a/classes/theme/methods.html b/classes/theme/methods.html index 89082a282..c85747c8e 100644 --- a/classes/theme/methods.html +++ b/classes/theme/methods.html @@ -178,8 +178,8 @@

forge(array $config = array())

view($view, $data = array(), $auto_filter = null)

view メソッドは、現在のテーマからビューをロードします。 - まずアクティブなテーマからロードを試みます。もしアクティブ・テーマにビューが存在せず、 - フォールバック・テーマが定義されている場合、フォールバック・テーマからビューをロードしようとします。 + まずアクティブなテーマからロードを試みます。もしアクティブなテーマにビューが存在せず、 + フォールバックテーマが定義されている場合、フォールバックテーマからビューをロードしようとします。 どちらにもビューがない場合、通常のビューの探し方で見つけたビュークラスにリクエストが渡されます。

@@ -189,7 +189,7 @@

view($view, $data = array(), $auto_filter = 静的 - No + いいえ パラメータ @@ -228,7 +228,7 @@

view($view, $data = array(), $auto_filter = 例外 - \ThemeException, リクエストされたビューファイルが見つからない場合 + \ThemeException 、リクエストされたビューファイルが見つからない場合。 例 @@ -248,70 +248,70 @@

view($view, $data = array(), $auto_filter =

presenter($presenter, $method = 'view', $auto_filter = null, $view = null)

- The presenter method loads and return a Presenter object based on the $presenter string passed. It - will use the view method documented above to pass the theme view to the Presenter. + presenter メソッドは、渡された 文字列 $presenter に基づいて読み込みプレゼンタオブジェクトを返します。 + これはプレゼンタのテーマビューを渡すために上記に記載された view のメソッドを利用します。

- - + + - + - - + + - - + + - + @@ -359,10 +359,10 @@

asset_path($path)

@@ -370,19 +370,19 @@

asset_path($path)

StaticNo静的いいえ
Parametersパラメータ - - - - + + + + - + - + - + - +
ParamTypeDefaultDescriptionパラメータデフォルト説明
$presenter string
null
The presenter name. See the Presenter for more information.プレゼンタ名。 プレゼンタを参照してください。
$method string
'view'
name of the method in the Presenter instance that will be called to process the data prior to rendering the view.事前にビューをレンダリングするデータを処理するために呼び出されるプレゼンターインスタンスのメソッド名
$auto_filter boolean
null
set to true or false to set auto encoding, defaults to main config setting (app/config/config.php)自動エンコーディングの設定をするために true または false に設定、メイン設定 (app/config/config.php) がデフォルト。
$view
null
Custom view name, used if the view to be loaded can not be determined from the presenter nameカスタムビュー名、プレゼンタ名から判別できないビューがロードされる場合に利用されます。
ReturnsA new Presenter object返り値新しい Presenter オブジェクト
Throws\ThemeException, when the requested view file could not be found.例外\ThemeException 、リクエストされたビューファイルが見つからない場合。
Example -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * with the default settings, will load the Presenter defined in
- * APPPATH.'classes/view/template/homepage.php', using the
- * THEMEDIR.'/template/homepage.php' view file
+ * デフォルトの設定とともに、
+ * THEMEDIR.'/template/homepage.php' のビューファイルを使用し、
+ * APPPATH.'classes/view/template/homepage.php' で定義されたプレゼンタを読み込みます。
  */
 $presenter = $theme->presenter('template/homepage');
 
@@ -324,14 +324,14 @@

presenter($presenter, $method = 'view',

asset_path($path)

- The asset_path method returns the path to the asset requested in $path, relative to the DOCROOT. - If the configured asset folder is a URL to the requested $path is returned. + asset_path メソッドは、 $path で要求された DOCROOT から相対的なアセットへのパスを返します。 + 設定されたアセットのフォルダがある場合は、要求された $path への URL が返されます。

- + @@ -346,8 +346,8 @@

asset_path($path)

- - + +
静的Noいいえ
パラメータ
$path stringrequiredThe asset requested.必須要求するアセット。

-
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// will return <img src="/THEMEDIR/assets/img/test.png" />
+// <img src="/THEMEDIR/assets/img/test.png" /> が返されます
 $img = \Html::img($theme->asset_path('img/test.png'));
 
-

Note that to every Theme class instance, an instance of the Asset class assigned. See the advanced page on how the use the Asset class instance.

+

すべての Theme クラスインスタンスへ Asset クラスのインスタンスが割り当てられていることに注意してください。 どのように Asset クラスインスタンスを利用するかについては 高度な使用法ページを参照してください。

add_path($path)

- The add_path method allows you to add a theme path at runtime. + add_path メソッドは、実行時にテーマのパスを追加することができます。

- + @@ -397,23 +397,23 @@

add_path($path)

- - + +
静的Noいいえ
パラメータ
$path stringrequiredThe path to a folder containing themes.必須テーマを含むフォルダへのパス。
返り値 - void + なし 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// add the 'mythemes' folder to the theme search paths
+// テーマの検索パスに 'mythemes' フォルダを追加
 $theme->add_path(DOCROOT.'mythemes');
 
@@ -425,13 +425,13 @@

add_path($path)

add_paths(array $paths)

- The add_paths method allows you to add multiple theme paths at runtime. + add_paths メソッドは、実行時に複数のテーマのパスを追加することができます。

- + @@ -446,23 +446,23 @@

add_paths(array $paths)

- - + +
静的Noいいえ
パラメータ
$paths arrayrequiredThe path to a folder containing themes.必須テーマを含むフォルダへのパス。
返り値 - void + なし 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// add the 'mythemes' folder to the theme search paths
+// テーマの検索パスに 'mythemes' フォルダを追加
 $theme->add_paths(
 	array(
 		DOCROOT.'mythemes'
@@ -478,13 +478,13 @@ 

add_paths(array $paths)

active($theme = null)

- The active method allows you to set the active theme. It will return the active theme definition array. + active メソッドは、アクティブなテーマを設定することができます。これはアクティブなテーマ定義の配列を返します。

- + @@ -500,7 +500,7 @@

active($theme = null)

- +
静的Noいいえ
パラメータ $theme string
null
The name of the active theme to select. If null, it will return the current active theme.アクティブなテーマの名前を選択します。 null の場合、現在のアクティブなテーマを返します。
@@ -511,15 +511,15 @@

active($theme = null)

例外 - \ThemeException, when the requested theme could not be found. + \ThemeException 、リクエストされたテーマが見つからない場合。 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// set the active theme to 'darkglow', and return its definition
+// 'darkglow' をアクティブなテーマとして設定し、その定義を返す。
 $active = $theme->active('darkglow');
 
@@ -531,13 +531,13 @@

active($theme = null)

fallback($theme = null)

- The fallback method allows you to set the fallback theme. It will return the fallback theme definition array. + fallback メソッドは、フォールバックのテーマを設定することができます。これは、フォールバックテーマ定義の配列を返します。

- + @@ -553,7 +553,7 @@

fallback($theme = null)

- +
静的Noいいえ
パラメータ $theme string
null
The name of the fallback theme to select. If null, it will return the current fallback theme.フォールバックテーマの名前を選択します。 null の場合、現在のフォールバックテーマを返します。
@@ -564,15 +564,15 @@

fallback($theme = null)

例外 - \ThemeException, when the requested theme could not be found. + \ThemeException 、リクエストされたテーマが見つからない場合。 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// set the fallback theme to 'basic', and return its definition
+// 'basic' をフォールバックテーマとして設定し、その定義を返す。
 $fallback = $theme->fallback('basic');
 
@@ -584,17 +584,17 @@

fallback($theme = null)

get_template()

- The get_template() method will return the View instance of the currently loaded theme template. + get_template() メソッドは、現在読み込まれているテーマのテンプレートの View インスタンスを返します。

- + - + @@ -603,11 +603,11 @@

get_template()

@@ -618,13 +618,13 @@

get_template()

set_template($template)

- The set_template method allows you to set the theme template for the page. + set_template メソッドは、ページ用のテーマのテンプレートを設定することができます。

静的Noいいえ
パラメータNoneなし
返り値
-
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// Retrieve the current template to set the page title
-$theme->get_template()->set('title', 'This is the page title');
+// ページタイトルを設定するために現在のテンプレートを取得
+$theme->get_template()->set('title', 'これはページタイトルです');
 
- + @@ -639,8 +639,8 @@

set_template($template)

- - + +
静的Noいいえ
パラメータ
$template stringrequiredThe name of the theme template view to load.必須読み込むテーマのテンプレートビューの名前。
@@ -652,11 +652,11 @@

set_template($template)

例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// set the page template to the subpage layout, and set the page title
-$theme->set_template('layouts/subpage')->set('title', 'Subpage title');
+// ウェブページのレイアウトのページテンプレートを設定し、ページタイトルを設定
+$theme->set_template('layouts/subpage')->set('title', 'サブページタイトル');
 
@@ -667,13 +667,13 @@

set_template($template)

get_partial($section, $view)

- The get_partial method allows you to get the view instance of a previously set partial in a named section of your page template. + get_partial メソッドは、ページテンプレートの名前が付いたセクションで事前に設定されたパーシャルビューインスタンスを取得することができます。

- + @@ -688,14 +688,14 @@

get_partial($section, $view)

- - + + - - + +
静的Noいいえ
パラメータ
$section stringrequiredThe name of page template section you want to get the partial from.必須パーシャルを取得したいページテンプレートセクションの名前
$view stringrequiredThe name of view to use for the partial必須パーシャルのために使用するビューの名前
@@ -707,12 +707,12 @@

get_partial($section, $view)

例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * Get the View instance of the 'partials/menu' view in the 'sidebar' section of the
- * currently loaded page template, and assign a variable to it.
+ * 現在読み込まれているページテンプレートの 'sidebar' セクションの 'partials/menu' ビューの
+ * View インスタンスを取得し、変数を割り当てる。
  */
 $theme->get_partial('sidebar', 'partials/menu')->set('class', 'menu green');
 
@@ -721,23 +721,23 @@

get_partial($section, $view)

- When you get a partial, use the name of the view you used to set it. If you assign the same view to the same - section multiple times, the first one will be returned. If you have passed a View instance to set_partial(), - you can get it using the number of the partial, prefixed with 'partial_'. - Example: you retrieve the second partial using the view name 'partial_2'. + パーシャルを取得するとき、それを設定するために使用するビューの名前を使用します。 同じビューへ同じセクションを複数回にわたり割り当てた場合、 + 最初のものが返されるでしょう。 set_partial() へ View インスタンスを渡している場合、 + 'partial_' をプレフィックスとした、パーシャルの番号を使用してそれを取得することができます。 + 例: ビュー名 'partial_2' を使用して、 2 番目のパーシャルを取得。

set_partial($section, $view, $overwrite = false)

- The set_partial method allows you to set a view partial for a named section of your page template. + set_partial メソッドは、ページテンプレートの名前が付いたセクションのための部分的なビューを設定することができます。

- + @@ -752,20 +752,20 @@

set_partial($section, $view, $overwri

- - + + - - + + - +
静的Noいいえ
パラメータ
$section stringrequiredThe name of page template section you want to add this partial to.必須このパーシャルを追加したいページテンプレートセクションの名前
$view string|ViewrequiredThe name of view to use for the partial, or a View object.必須パーシャルを使用するためのビューの名前、または View オブジェクト
$overwrite boolean
false
If false, append the partial to any partials already defined for this section. If true, existing contents will be deleted.falseの場合、このセクションで既に定義された任意のパーシャルにパーシャルを追加します。 true の場合、既存の内容は削除されます。
@@ -777,14 +777,14 @@

set_partial($section, $view, $overwri 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * Assign the 'partials/menu' view to the 'sidebar' section of the
- * currently loaded page template.
+ * 現在読み込まれているページテンプレートの 'sidebar' セクションに
+ * 'partials/menu' ビューを割り当てます。
  *
- * In the template, this partial is echo'd out as $partials['sidebar'];
+ * テンプレート内で、このパーシャルは $partials['sidebar'] として echo されます。
  */
 $theme->set_partial('sidebar', 'partials/menu');
 
@@ -797,44 +797,44 @@

set_partial($section, $view, $overwri

partial_count($section)

- The partial_count method returns a count of the number of partials defined for the given section. + partial_count メソッドは、指定されたセクション用に定義されたパーシャルの数を返します。

- - + + - + - + - + @@ -846,47 +846,47 @@

partial_count($section)

has_partials($section)

- The has_partials method allows you to check if a template section has any partials defined. + has_partials メソッドは、テンプレートセクションが任意のパーシャルの定義を持つかどうかを確認することができます。

StaticNo静的いいえ
Parametersパラメータ - - - - + + + + - - + +
ParamTypeDefaultDescriptionパラメータデフォルト説明
$section stringrequiredThe name of page template section you want to check for defined partials.必須確認したいパーシャルが定義されたページテンプレートセクションの名前
Returns返り値 Integer
Example -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// Get the number of partials assigned to the sidebar
+// sidebar に割り当てられたパーシャルの数
 $partials = $theme->partial_count('sidebar');
 
- - + + - + - + - + @@ -898,13 +898,13 @@

has_partials($section)

get_chrome($section)

- The get_chrome method allows you to get the view instance of a previously set partial chrome. + get_chrome メソッドは、事前に設定されたパーシャルクロームのビューのインスタンスを取得することができます。

StaticNo静的いいえ
Parametersパラメータ - - - - + + + + - - + +
ParamTypeDefaultDescriptionパラメータデフォルト説明
$section stringrequiredThe name of page template section you want to check for defined partials.必須確認したいパーシャルが定義されたページテンプレートセクションの名前
Returns返り値 Boolean
Example -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// Check if we have sidebar partials defined
+// sidebar のパーシャルが定義されているか確認
 if ( ! $theme->has_partials('sidebar'))
 {
-	// some code here to hide the sidebar...
+	// サイドバーを非表示にする何らかのコード...
 }
 
- + @@ -919,8 +919,8 @@

get_chrome($section)

- - + +
静的Noいいえ
パラメータ
$section stringrequiredThe name of section you want to get the partial chrome from.必須パーシャルクロームを取得したいセクションの名前。
@@ -932,14 +932,14 @@

get_chrome($section)

例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * Get the View instance for the chrome assigned to the 'sidebar' of the
- * template and assign a variable to it.
+ * テンプレートの 'sidebar' に割り当てられたクロームのための
+ * View インスタンスを取得し、そこに変数を割り当てる。
  */
-$theme->get_chrome('sidebar')->set('title', 'This is a sidebar');
+$theme->get_chrome('sidebar')->set('title', 'これはサイドバーです');
 
@@ -950,13 +950,13 @@

get_chrome($section)

set_chrome($section, $view, $var = 'content')

- The set_chrome method allows you to define chrome for a partial section of your page template. + set_chrome メソッドは、ページテンプレートのパーシャルセクションのためのクロムを定義することができます。

- + @@ -971,20 +971,20 @@

set_chrome($section, $view, $var = 'co

- - + + - - + + - +
静的Noいいえ
パラメータ
$section stringrequiredThe name of page template section you want to add this partial to.必須このパーシャルを追加したいページテンプレートセクションの名前
$view string|ViewrequiredThe name of view to use for the chome of the partial, or a View object.必須パーシャルのクロームのために使用するビューの名前、または View オブジェクト
$var string
'content'
The name of the variable in the chrome view used to output the partial content.クロームビューがパーシャルコンテンツの出力時に利用する変数の名前
@@ -996,15 +996,15 @@

set_chrome($section, $view, $var = 'co 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * Assign the 'chrome/roundedcorners' view to the 'sidebar' section of the
- * currently loaded page template to give the partial section a border with
- * rounded corners.
+ * パーシャルセクションに丸みを帯びた角を持つ枠を与えるために現在読み込まれている
+ * ページテンプレートの 'sidebar' セクションに 'chrome/roundedcorners'
+ * ビューを割り当てます。
  *
- * In the chrome view, the partial output is echo'd out as $body;
+ * クロムビュー内で、パーシャルの出力は $body として echo されます;
  */
 $theme->set_chrome('sidebar', 'chrome/roundedcorners', 'body');
 
@@ -1017,54 +1017,54 @@

set_chrome($section, $view, $var = 'co

set_order($section, $order)

- The set_order method allows you to define a custom ordering in which your partial - sections will be rendered. + set_order メソッドは、パーシャルセクションがレンダリングされるカスタムな順序を + 定義することができます。

- This can be useful if some partials depend on what happens in others, for example if your partials - can generate messages, and you have a messages partial which will display them. In this case, you - would want to render the messages partial after all others. - Sections without a defined order are rendered before all others. + いくつかのパーシャルが何か他に起こることに依存している場合、たとえば、パーシャルが messages を生成でき、 + そしてそれらを表示する messages パーシャルを持っている場合、これは便利です。 この場合、 + 他のすべてより後に messages パーシャルをレンダリングしたいと思うでしょう。 + 定義された順序がないセクションでは他のすべてより前にレンダリングされます。

- - + + - + - + - + @@ -1133,17 +1133,17 @@

find($theme)

all()

- The all method returns an array of all themes in all theme paths, sorted alphabetically. + all メソッドは、アルファベット順にソートされたすべてのテーマパス内のすべてのテーマの配列を返します。

StaticNo静的いいえ
Parametersパラメータ - - - - + + + + - - + + - - + +
ParamTypeDefaultDescriptionパラメータデフォルト説明
$section stringrequiredThe name of page template section you want to define the order on.必須順序を定義したいページテンプレートセクションの名前。
$order integerrequiredThe relative order of the partial section. Must be between 1 and 9.必須パーシャルセクションの相対的な順序。 1 から 9 の間でなければらない。
Example -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
 /**
- * Make sure the messages partial is rendered after all others
+ * messages パーシャルが他のすべてより後にレンダリングされるようにする
  */
 $theme->set_chrome('messages', 9);
 
@@ -1077,13 +1077,13 @@

set_order($section, $order)

find($theme)

- The find method will iterate over the defined search paths to find the theme requested. + find メソッドは、要求されたテーマを見つけるために定義された検索パスを繰り返し処理します。

- + @@ -1098,30 +1098,30 @@

find($theme)

- - + +
静的Noいいえ
パラメータ
$theme stringrequiredThe name of the theme to find.必須検索するテーマの名前。
返り値mixed. Returns the path to the theme if found, or false if not.mixed. 見つかった場合はテーマへのパスを返し、そうでない場合は false
-
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// find the 'darkglow' theme
+// 'darkglow' テーマを探す
 if ($path = $theme->find('darkglow'))
 {
-	// the theme can be found in $path
+	// テーマは $path で見つかった
 }
 else
 {
-	// unable to find the theme
+	// テーマを見つけることができなかった
 }
 
- + - + @@ -1152,10 +1152,10 @@

all()

@@ -1167,52 +1167,52 @@

all()

use_modules($enable = true)

- The use_modules method enables or disables the prefixing feature for views loaded from a - module. If true, the views loaded via the Theme class will be prefixed by the current active module - name (if any). If a string is passed, it will be prefixed as well, allowing you to store all modules in a - separate directory, to avoid name conficts between module names and non-prefixed view names. If the view can - not be found, it's checked again without the prefix, allowing for global views from inside a module. If that - doesn't exist either, the View class will be called to load the view the regular way. + use_modules メソッドは、モジュールから読み込まれたビューのプレフィックス機能を有効または無効にします。 + true の場合、 Theme クラスを介してビューが読み込まれ、 (もしあれば) 現在アクティブなモジュール名が付きます。 + 文字列が渡された場合、それは同じようにプレフィックス付き、モジュール名とプレフィックスが付いていないビュー名の間で名前の競合を避けるために、 + 別のディレクトリにすべてのモジュールを格納することができます。 + ビューが見つからない場合、それはプレフィックスを付けず再確認され、モジュール内からグローバルビューを利用可能にします。 + どちらも存在しない場合、View クラスはビューを通常の方法を読み込むために呼び出されます。

静的Noいいえ
パラメータNoneなし
返り値
-
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// fetch all installed themes
+// インストールされているすべてのテーマを取得
 $themes = $theme->all();
 
- + - + - + - + @@ -1221,21 +1221,21 @@

use_modules($enable = true)

静的Noいいえ
Parametersパラメータ - - - - + + + + - +
ParamTypeDefaultDescriptionパラメータデフォルト説明
$enable boolean | string
true
True or a string containing a folder name to enable the feature, false to disable it.True またはフォルダ名を含む文字列の場合はは機能を有効にし、それを無効にする場合は false 。
Returns返り値 Theme
Example -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// when in the module 'test', this will load the theme view 'test/controller/view'
+// モジュール 'test' 内の場合、これはテーマビュー 'test/controller/view' を読み込みます。
 $info = $theme->use_modules()->set_partial('content', 'controller/view')->use_modules(false);
 
-// when in the module 'test', this will load the theme view 'modules/test/controller/view'
+// モジュール 'test' 内の場合、これはテーマビュー 'modules/test/controller/view' を読み込みます。
 $info = $theme->use_modules('modules')->set_partial('content', 'controller/view')->use_modules(false);
 

- You can set a global default value through the use_modules key of the theme.php configuration file. + theme.php 設定ファイルの use_modules キーによりグローバルなデフォルト値を設定することができます。

load_info($theme = null)

- The load_info method returns the complete info array for a theme. - If no theme is specified, the info of the active theme is returned. + load_info メソッドはテーマの完全な情報の配列を返します。 + テーマが指定されていない場合、アクティブなテーマの情報が返されます。

- + @@ -1251,7 +1251,7 @@

load_info($theme = null)

- +
静的Noいいえ
パラメータ $theme string
null
The name of the theme.テーマの名前。
@@ -1262,15 +1262,15 @@

load_info($theme = null)

例外 - \ThemeException, when the requested theme could not be found. + \ThemeException 、リクエストされたテーマが見つからない場合。 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// get the information array for the 'basic' theme.
+// 'basic' テーマの情報配列を取得します。
 $info = $theme->load_info('basic');
 
@@ -1279,23 +1279,23 @@

load_info($theme = null)

- If no theme info file could be found, this method Throws \ThemeException if require_info_file is - set to true, or an empty array is returned if require_info_file is - set to false. + テーマ情報ファイルがない場合、require_info_filetrue + に設定されている場合、このメソッドは \ThemeException を発生させ、 require_info_file が + false に設定されている場合、空の配列が返されます。

save_info($type = 'active')

- The save_info saves the contents of the theme info array - back to the theme info file. + save_info はテーマ情報ファイルへテーマ情報の配列の内容を + 保存します。

- + @@ -1311,7 +1311,7 @@

save_info($type = 'active')

- +
静的Noいいえ
パラメータ $type string
'active'
Whether the active or fallback theme info should be saved.アクティブまたはフォールバックテーマの情報を保存するかどうか。
@@ -1322,15 +1322,15 @@

save_info($type = 'active')

例外 - \ThemeException, when the requested theme could not be found. + \ThemeException 、リクエストされたテーマが見つからない場合。 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// save the information array for the active theme.
+// active テーマの情報配列を保存します。
 $info = $theme->save_info('active');
 
@@ -1339,23 +1339,23 @@

save_info($type = 'active')

- If no theme info file could be found, this method Throws \ThemeException if require_info_file is - set to true, or an empty array is returned if require_info_file is - set to false. + テーマ情報ファイルがない場合、require_info_filetrue + に設定されている場合、このメソッドは \ThemeException を発生させ、 require_info_file が + false に設定されている場合、空の配列が返されます。

get_info($var, $default = null, $theme = null)

- The get_info method returns a specific variable from the theme info array. - If no theme is specified, the info array of the active theme is used. + get_info メソッドはテーマ情報配列から特定の変数を返します。 + テーマが指定されていない場合、アクティブなテーマの情報配列が使用されます。

- + @@ -1370,20 +1370,20 @@

get_info($var, $default = null, $theme =

- - + + - + - +
静的Noいいえ
パラメータ
$var stringrequiredThe name of the info variable to retrieve.必須取得する情報変数の名前。
$default mixed
null
The value to return if the requested $var does not exist.要求された $var が存在しない場合に返る値。
$theme string
null
The name of the theme whose info file should be searched.情報ファイルが検索されるべきテーマの名前。
@@ -1394,15 +1394,15 @@

get_info($var, $default = null, $theme = 例外 - \ThemeException, when the requested theme could not be found. + \ThemeException 、リクエストされたテーマが見つからない場合。 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// get the color defined the the 'basic' theme, and if not set, use 'blue'
+// 'basic' テーマで定義した色を取得し、設定されていない場合 'blue' を利用
 $var = $theme->get_info('color', 'blue', 'basic');
 
@@ -1410,22 +1410,22 @@

get_info($var, $default = null, $theme =

- If you specify a theme, the value is loaded from the theme info file. This is true even if the theme specified - is currently set as active or passive theme. For those, the loaded (and possibly modified) info is not used! + テーマを指定した場合、値がテーマ情報ファイルからロードされます。 これは、指定されたテーマは現在アクティブまたはパッシブ + テーマとして設定されている場合も同様です。それらのために、読み込まれた (そしておそらく変更された) 情報は利用されません!

set_info($var, $value = null, $type = 'active')

- The set_info method allows you to set a varaible in the active or fallback theme info array. - If no theme is specified, the info array of the active theme is used. + set_info メソッドは、アクティブまたはフォールバックテーマ情報配列内の変数を設定することができます。 + テーマが指定されていない場合、アクティブなテーマの情報配列が使用されます。

- + @@ -1440,20 +1440,20 @@

set_info($var, $value = null, $type = 'a

- - + + - + - +
静的Noいいえ
パラメータ
$var stringrequiredThe name of the info variable to set.必須設定する情報変数の名前。
$value mixed
null
The value to set.設定する値。
$type string
'active'
Whether the variable should be set in the active or fallback theme.アクティブまたはフォールバックテーマのどちらに値を設定する必要があるか。
@@ -1465,10 +1465,10 @@

set_info($var, $value = null, $type = 'a 例 -
// Get the default instance
+							
// デフォルトのインスタンスを取得
 $theme = \Theme::instance();
 
-// set the color to blue of the fallback theme
+// フォールバックテーマを青に色を設定
 $theme->set_info('color', 'blue', 'fallback');