当前位置: 首页>>代码示例>>PHP>>正文


PHP user_guide_url函数代码示例

本文整理汇总了PHP中user_guide_url函数的典型用法代码示例。如果您正苦于以下问题:PHP user_guide_url函数的具体用法?PHP user_guide_url怎么用?PHP user_guide_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_guide_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_r

$table_meta = $this->examples_model->table_info(); 

echo $table_meta['id']['type']; // int 
echo $table_meta['id']['primary_key']; // 1 (TRUE) 
echo $table_meta['email']['type']; // varchar 
echo $table_meta['first_name']['type']; // varchar 
echo $table_meta['description']['type']; // text 
echo $table_meta['active']['type']; // enum 
print_r($table_meta['active']['options']); // array('yes', 'no') 
</pre>


<h2>$this->examples_model->form_fields(<var>[values]</var>, <var>[related]</var>)</h2>
<p>Somewhat similar to the table_info method with difference being that the returned array has information for creating a form.
The related parameter is used to conveniently map other model information with this form to create a many to many multi-select form element.
This method is usally used with the <a href="<?=user_guide_url('libraries/form_builder')?>">Form_builder</a> class.
</p>

<pre class="brush: php">
$form_info = $this->examples_model->form_fields(); 

echo $form_fields['id']['type']; // hidden 
echo $table_meta['email']['type']; // text 
echo $table_meta['email']['required']; // 1 (TRUE) 
echo $table_meta['first_name']['type']; // text 
echo $table_meta['description']['type']; // textfield 
echo $table_meta['active']['type']; // select or enum 
echo $table_meta['date_added']['type']; // datetime (a special field type in the form_builder class) 
</pre>

开发者ID:rodrigowebe,项目名称:FUEL-CMS,代码行数:29,代码来源:table_class_functions.php

示例2: user_guide_url

<h1>Inline Editing</h1>
<p>Inline editing allows users to quickly modify module information within the context of the website. This is accomplished by using
either the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_edit</a> or the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_var</a> function with the latter
specific to pages that are completely editable (and not just module data).
</p>

<p>For inline editing to work, you must be logged into FUEL and have the proper permissions to edit the page or module information. 
A <span style="background: transparent url(<?php 
echo img_path('ico_pencil.png', FUEL_FOLDER);
?>
) no-repeat; display: inline-block; height: 16px; width: 16px;"></span> pencil icon
will appear over editable areas when the editing for the page is toggled on. Clicking on the icon will overlay a form over your page to edit the values in context.</p>

<h2>Page Inline Editing</h2>
<p>Page inline editing allows you to edit the values of variables used in the page.
A FUEL logo will be displayed in the upper right area of the page that can slide out and provide you 
the ability to toggle inline editing, publish status and caching. Clicking the inline editing pencil will toggle inline editing on.</p>
<img src="<?php 
echo img_path('examples/page_inline_editing.jpg', 'user_guide');
?>
" class="screen" />

<h2>Module Inline Editing</h2>
<p>For those pages that may not be editible, you can still allow for module data to be edited (e.g. news items).
The top right area <strong>will not</strong> have the controls for page publish status, caching or layouts and will look like the following:</p>
开发者ID:kieranklaassen,项目名称:FUEL-CMS,代码行数:31,代码来源:inline-editing.php

示例3: user_guide_url

echo user_guide_url('helpers/fuel_helper');
?>
">fuel_model and fuel_block</a> helper functions that could be used instead.</p>


<h3>Inline Editing</h3>
<p>The very last thing we will do is add inline editing to our view. To do this we use the <a href="helpers/fuel_helper">fuel_edit</a> function. We'll
place that function right inside the &lt;h2&gt; tag. </p>

<pre class="brush: php">
...
&lt;h2&gt;&lt;?=fuel_edit($article-&gt;id, 'Edit: '.$article-&gt;name, 'articles')?&gt;&lt;?=$article-&gt;title?&gt;&lt;/h2&gt;
...
</pre>

<p>Additionally, you may add items in the context of a page. To do that, you pass <dfn>create</dfn> as the first parameter.</p>
&lt;h2&gt;&lt;?=fuel_edit('create', 'Create', 'articles')?&gt;&lt;?=$article-&gt;title?&gt;&lt;/h2&gt;

<p class="important"><a href="<?php 
echo user_guide_url('general/inline-editing');
?>
">Click here for more on inline editing</a></p>

<p><strong>That's it!</strong></p>

<?php 
/* ?>
<h2>Now What?</h2>
<p>If you are wanting to create more advanced modules, <a href="<?=user_guide_url('modules/advanced')?>">click here</a>.</p>
<p><a href="<?=site_url(USER_GUIDE_FOLDER.'/examples/fuel_modules_example.zip')?>">Click here to download the files to the example.</a></p>
<?php */
开发者ID:roliandra,项目名称:WebInterface-Fuel,代码行数:31,代码来源:tutorial.php

示例4: array

<p>Add the following module to the <dfn>application/config/MY_fuel_modules.php</dfn> file: </p>
<pre class="brush: php">
$config['modules']['news'] = array(
	'preview_path' => 'news/{slug}'
);
</pre>


<h3 id="view_file">View File</h3>
<p>You could use a controller to do the url segment logic but for this tutorial, we will just use a single view. 
The following view file uses the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_model</a> and 
<a href="<?php 
echo user_guide_url('libraries/my_model/data_record_class_functions');
?>
">custom record objects</a>.</p>
<pre class="brush: php">
&lt;?php 
$slug = uri_segment(2);
if (!empty($slug))
{
	$news_item = fuel_model('news', array('find' => 'one', 'where' => array('slug' => $slug)));
	if (empty($news_item)) show_404();
}
else
{
	$news = fuel_model('news');
}
?&gt;
开发者ID:kbjohnson90,项目名称:FUEL-CMS,代码行数:31,代码来源:pages-variables.php

示例5: marker

</p>


<h2>fuel_edit(<var>id</var>, <var>[label]</var>, <var>[module]</var>, <var>[xOffset]</var>, <var>[yOffset]</var>)</h2>
<p>Sets a variable marker (pencil icon) in a page which can be used for inline editing.
The <dfn>id</dfn> parameter is the unique id that will be used to query the module. You can also pass an id value
and a field like so <dfn>id|field</dfn>. This will display only a certain field instead of the entire module form.
The <dfn>label</dfn> parameter specifies the label to display next to the pencil icon.
The <dfn>xOffset</dfn> and <dfn>yOffset</dfn> are pixel values to offset the pencil icon.
</p>


<h2>fuel_cache_id(<var>[location]</var>)</h2>
<p>Creates the cache ID for the fuel page based on the URI. 
If no <dfn>location</dfn> value is passed, it will default to the current <a href="<?php 
echo user_guide_url('my_url_helper');
?>
">uri_path</a>.
</p>


<h2>fuel_url(<var>[uri]</var>)</h2>
<p>Creates the admin URL for FUEL (e.g. http://localhost/MY_PROJECT/fuel/admin).</p>


<h2>fuel_uri(<var>[uri]</var>)</h2>
<p>Returns the FUEL admin URI path.</p>


<h2>fuel_uri_segment(<var>[seg_index]</var>, <var>[rerouted]</var>)</h2>
<p>Returns the uri segment based on the FUEL admin path.</p>
开发者ID:kieranklaassen,项目名称:FUEL-CMS,代码行数:31,代码来源:fuel_helper.php

示例6: user_guide_url

">allowed by default</a>, however you can use FUEL's
<a href="<?php 
echo user_guide_url('parsing');
?>
">parsing syntax</a>. Page variables can be <a href="<?php 
echo user_guide_url('general/inline-editing');
?>
">edited inline</a> 
if their layout uses the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_var</a> function to set the variables locations in the layout.

</p>
<img src="<?php 
echo img_path('examples/screen_page_edit.jpg', 'user_guide');
?>
" class="screen" />

<h2>Importing Existing Views</h2>
<p>If you are using <a href="<?php 
echo user_guide_url('general/opt-in-controller');
?>
">Opt-in Controllers</a>, 
a view file that matches the URI location will trigger a prompt to import that view to edit if the modified date is after the pages last modified date.
This is a convenient way to make edits outside of the admin interface and import them.</p>
<img src="<?php 
echo img_path('examples/screen_page_import.jpg', 'user_guide');
?>
" class="screen" />
开发者ID:kieranklaassen,项目名称:FUEL-CMS,代码行数:30,代码来源:pages.php

示例7: user_guide_url

?>
">Simple Modules</a></li>
	<li><a href="<?php 
echo user_guide_url('modules/tutorial');
?>
">Creating Simple Modules Tutorial</a></li>
	<li><a href="<?php 
echo user_guide_url('modules/advanced');
?>
">Advanced Modules</a></li>
	<li><a href="<?php 
echo user_guide_url('modules/module_forms');
?>
">Module Forms</a></li>
	<li><a href="<?php 
echo user_guide_url('modules/hooks');
?>
">Module Hooks</a></li>
</ul>


<h2>Installation</h2>
<p>One of the bigger changes in FUEL v1.0 was the removal of all the extra bundled advanced modules. The reason was to keep the initial FUEL install
smaller, as well as provide separate GIT repository versioning and issue tracking for each. 
A list of some available modules can currently be found at <a href="https://github.com/daylightstudio" target="_blank">https://github.com/daylightstudio</a>.
Because of this change, it was deemed necessary to make the installation and updating process of advanced modules a little easier going forward. </p>


<h3>Using GIT Submodules</h3>
<p>We like to lean on GIT as much as possible for the updating of advanced modules and so we've added a couple command line tools to make this a little easier. 
The first is to use GIT to add a <a href="http://git-scm.com/book/en/Git-Tools-Submodules" target="_blank">submodule</a> to your installation in your <span class="file">fuel/modules/{module}</span> folder. 
开发者ID:magicjoey,项目名称:FUEL-CMS,代码行数:31,代码来源:modules.php

示例8: user_guide_url

// !!! IMPORTANT ... NOW ASSIGN THIS TO THE MAIN "layouts"
$config['layouts']['main'] = $main_layout;
</pre>

<p class="important"><strong>What is all this other stuff in the "Sections area"?</strong> We added this to the example just to show how complicated you can get with the layouts. The above is using 
several new features including the addition of the class "tabs" which can be applied to a "type" of "fieldset" and creates tabs for your forms automatically. We are also
displaying the new field type of "template", which gives you the power to easilty create complicated repeatable forms that you can reorder and nest inside other forms. 
For more details visit the <a href="#">Form_builder</a> page.</p>




<h2 id="layouts_custom_classes">Custom Layout Classes</h2>
<p>Occasionally, you may need a layout that does some additional variable processing before being applied to the page. To accomplish this, you can create your own 
Layout class by extending the <a href="<?php 
echo user_guide_url('libraries/fuel_layouts#fuel_layout');
?>
">Fuel_layout</a> class and modifying the <dfn>pre_process</dfn> and/or <dfn>post_process</dfn> method hooks. The <dfn>pre_process</dfn> 
method gets passed the array of variables used to generate the page (e.g. formatting of dates). 
The <dfn>post_process</dfn> method gets passed the final rendered output in case you want to do any post rendering of the final output (e.g. appending tracking scripts).
You can tell FUEL where to look for the class by specifying <dfn>file</dfn>, <dfn>class</dfn>, <dfn>filepath</dfn> and <dfn>filename</dfn> parameters as displayed below:
</p>

<pre class="brush:php">
$config['layouts']['main'] = array(
	'class'		=> 'Main_layout',
	'filepath' => 'libraries',
	'filename' => 'Main_layout.php',
	'module'  => 'app',
	'fields'	=> array(
		'Header' => array('type' => 'fieldset', 'label' => 'Header', 'class' => 'tab'),
开发者ID:huayuxian,项目名称:FUEL-CMS,代码行数:31,代码来源:layouts.php

示例9: constants

				This line will add the menu item in the admin.
			</li>
			<li>In the constants folder its a good idea to create the following constants (although not required)
				<ul>
					<li><strong>{MODULE_NAME}_VERSION</strong> - the version number of the module</li>
					<li><strong>{MODULE_NAME}_FOLDER</strong> - the folder name of the module</li>
					<li><strong>{MODULE_NAME}_PATH</strong> - the full directory path to the module folder</li>
				</ul>
			</li>
			<li>In the routes file, add the fuel routes you want to use. For example, this <strong>user_guide</strong> module has the following routes:
				<ul>
					<li>$route[FUEL_FOLDER.'/tools/user_guide'] = 'user_guide';</li>
					<li>$route[FUEL_FOLDER.'/tools/user_guide/:any'] = 'user_guide/$1';</li>
				</ul>
			</li>
		</ul>
	
	</li>
	<li>Create your controller files. 
		<ul>
			<li><strong>Admin Controllers</strong> - Pages that need to be displayed in the admin interface should inherit from the <dfn>fuel/libraries/Fuel_base_controller.php</dfn> and can use the <dfn>_validate_user()</dfn>, protected controller method.</li>
			<li><strong>Dashboard Controller</strong> - If you add a controller with the name of <dfn>Dashboard</dfn>, then it can get pulled in to the FUEL admin (if the module is in the fuel $config['dashboards'] configuration)</li>
		</ul>
	</li>
	<li>Create your assets folder and add any specific styles you want to use for that module's admin interface in a <dfn>css/{module_name}.css</dfn> file including your menu item icons.</li>
	<li>If you have the <a href="<?php 
echo user_guide_url('modules/tester');
?>
">Tester</a> module, you can add your tests to a <dfn>tests</dfn> folder.</li>
	<li>If you have this <dfn>user_guide</dfn> module installed, you can add documentation to the <dfn>views/_docs/</dfn> folder. There needs to be at least an <dfn>index.php</dfn> file before it will appear in the <dfn>user_guide</dfn> module.</li>
</ol>
开发者ID:joeydi,项目名称:FUEL-CMS,代码行数:31,代码来源:advanced.php

示例10: data

<h3>Common Controller Methods</h3>
<p>There are two main jQX controller methods that you may want to override in your controller:</p>
<ul>
	<li><strong>items:</strong> the jQX controller method used for the list view of the module</li>
	<li><strong>add_edit:</strong> the jQX controller method used for adding/editing module data (the form view)</li>
</ul>
<p class="important">It's important to call use <dfn>this.super()</dfn> to call the parent method if overwriting.</p>

<h3>jQX Configuration Parameters</h3>
<p>The following jqx config parameters are available for you to use in your jQX controller:</p>
<ul>
	<li><strong>jqx.config.basePath:</strong> The equivalent value to the <a href="http://codeigniter.com/user_guide/helpers/url_helper.html" target="_blank">site_url()</a> CI function </li>
	<li><strong>jqx.config.jsPath:</strong> The path to the fuel modoules javascript folder which is <span class="file">/fuel/modules/fuel/assets/js/</span></li>
	<li><strong>jqx.config.imgPath:</strong> The path to the fuel modoules images folder which is <span class="file">/fuel/modules/fuel/assets/images/</span></li>
	<li><strong>jqx.config.uriPath:</strong> The equivalent to the <a href="<?php 
echo user_guide_url('helpers/my_url_helper');
?>
">uri_path()</a> function</li>
	<li><strong>jqx.config.assetsImgPath:</strong> The path the sites images (e.g. <span class="file">/assets/images/</span>)</li>
	<li><strong>jqx.config.assetsPath:</strong> The path the sites images (e.g. <span class="file">/assets/</span>)</li>
	<li><strong>jqx.config.assetsCssPath:</strong> The path the sites images (e.g. <span class="file">/assets/css/</span>)</li>
	<li><strong>jqx.config.controllerName:</strong> The global name of the controller object which can be used by other scripts after the page is loaded. The default is "fuel"</li>
	<li><strong>jqx.config.jqxPath:</strong> The path to the jQX library which is <span class="file">/fuel/modules/fuel/assets/js/jqx</span></li>
	<li><strong>jqx.config.controllerPath:</strong> The path to the controller</li>
	<li><strong>jqx.config.pluginPath: The path to the jQuery plugins</strong></li>
	<li><strong>jqx.config.fuelPath:</strong> The path to the FUEL CMS which by default is <span class="file">fuel/</span></li>
	<li><strong>jqx.config.modulePath:</strong> The path to the module which is <span class="file">fuel/{module}</span></li>
	<li><strong>jqx.config.cookieDefaultPath:</strong> The server folder path used when assigning cookies</li>
	<li><strong>jqx.config.keyboardShortcuts:</strong> The keyboard shortcuts to be used in the CMS</li>
	<li><strong>jqx.config.warnIfModified:</strong> Determines whether to warn upon leaving a page that has unsaved field content</li>
	<li><strong>jqx.config.cacheString:</strong> A string value that represents the assets <dfn>last_updated</dfn> configuration value and can be used to caching or breaking a cache</li>
开发者ID:pwhsueh,项目名称:voting,代码行数:31,代码来源:javascript.php

示例11: folder_files

 /**
  * Returns an array with the keys as links and the values as the name of the file
  * 
  * @access	public
  * @param	stirng	The name of the folder relative to the MODULES_PATH
  * @param	string	Module folder name (optional)
  * @param	array	An array of files to exclude from the list (optional)
  * @return	array
  */
 function folder_files($folder, $module = NULL, $exclude = array())
 {
     $this->CI->load->helper('file');
     $this->CI->load->helper('directory');
     $folder_arr = explode('/', $folder);
     if (isset($folder_arr[1])) {
         $module = $folder_arr[0];
         $folder = $folder_arr[1];
     }
     if (empty($module)) {
         $module = $this->page_segment(2);
     }
     $module_path = MODULES_PATH . $module . '/';
     // force exclude to an array
     $exclude = (array) $exclude;
     // add PHP extension if it doesn't exist'
     foreach ($exclude as $key => $val) {
         if (!preg_match('#.+\\.php$#', $val)) {
             $exclude[$key] = $val . EXT;
         }
     }
     $exclude[] = 'index.html';
     $files = directory_to_array($module_path . $folder, FALSE, $exclude, FALSE, TRUE);
     $return = array();
     if (is_array($files)) {
         foreach ($files as $file) {
             if ($module != FUEL_FOLDER) {
                 $url = user_guide_url('modules/' . $module . '/' . strtolower($file));
             } else {
                 $url = user_guide_url(strtolower($file));
             }
             $return[$url] = humanize($file);
         }
     }
     return $return;
 }
开发者ID:rudyondolan,项目名称:FUEL-CMS-User-Guide-Module,代码行数:45,代码来源:Fuel_user_guide.php

示例12: user_guide_url

?>
">view the tutorial for more information</a>).
</p>

<ul>
	<li>list_items()</li>
	<li>tree()</li>
	<li>form()</li>
</ul>

<p>Additionally, there are <a href="<?php 
echo user_guide_url('libraries/my_model#hooks');
?>
">several hooks</a> you may want to use that allow you to insert functionality during the saving and deleting process of a modules record.</p>

<h2>The Views</h2>
<p>Simple modules are made up of several views:</p>
<ul>
	<li><a href="<?php 
echo user_guide_url('general/interface#list_view');
?>
"><strong>List view</strong></a> - where you can filter and select from a list and edit, delete or preview.</li>
	<li><a href="<?php 
echo user_guide_url('general/interface#edit_view');
?>
"><strong>Form view</strong></a> - the form view that allows you to edit or input new records for the module</li>
	<li><strong>Tree view (optional)</strong> - provides a tree like hierarchical structure. Requires a tree method on the module's model that follows the hierarchical <dfn>Menu</dfn> structure</li>
	<li><strong>Preview view (optional)</strong> - the URO to the website to preview the module</li>
</ul>

开发者ID:joeydi,项目名称:FUEL-CMS,代码行数:29,代码来源:simple.php

示例13: array

	<li>{pdf_path('my_pdf.pdf')} - Maps to the <a href="<?=user_guide_url('helpers/asset_helper')?>">pdf_path()</a> function. The <dfn>.pdf</dfn> extension is optional.</li>
	<li>{safe_mailto('my@email.com', 'text')} - Maps to the  <a href="http://codeigniter.com/user_guide/helpers/url_helper.html" target="_blank">safe_mailto()</a> function.</li>
	<li>{redirect('my_redirect_page')} - Maps to the <a href="http://codeigniter.com/user_guide/helpers/url_helper.html" target="_blank">redirect()</a> function.</li>
	<li>{show_404} - Maps to the <a href="http://codeigniter.com/user_guide/general/errors.html" target="_blank">show_404()</a> function.</li>
</ul>

<h2>Namespaced Functions</h2>
<p>The following are namespaced functions that can be used in your application and will be translated by the templating system.</p>

<ul>
	<li>{uri_segment(1, true/false)} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">uri_segment(n)</a> function.</li>
	<li>{fuel_var} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">fuel_var()</a> function.</li>
	<li>{fuel_model(model, array(key="val"...)} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">fuel_modules()</a> function.</li>
	<li>{fuel_block(array(key="val"...))} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">fuel_block()</a> function.</li>
	<li>{fuel_nav(array(key="val"...))} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">fuel_nav()</a> function.</li>
	<li>{fuel_edit(id, label, module, xOffset, yOffset)} - Maps to the <a href="<?=user_guide_url('helpers/fuel_helper')?>">fuel_edit()</a> function.</li>
</ul>
<p class="important">Note that several of the functions require an associative array paramter with the <dfn>key="val"</dfn> syntax.</p>

<h2>Blocks</h2>
<p>Tag pairs allow you to loop through arrays of data. The syntax requires an opening <dfn>{my_var}</dfn> and closing <dfn>{/my_var}</dfn> tag. 
For example:</p>

<pre class="brush:php">
$my_data = array();
$my_data[] = array('name' => 'Darth Vader', 'weapon' => 'light saber');
$my_data[] = array('name' => 'Han Solo', 'weapon' => 'blaster');
...
{loop $my_data}
	{$name} - {$weapon}
{loop}
开发者ID:rodrigowebe,项目名称:FUEL-CMS,代码行数:31,代码来源:parsing.php

示例14: user_guide_url

echo user_guide_url('helpers/my_language_helper#func_detect_lang');
?>
">detect_lang()</a> function detects any specified language settings pulling from the URI, query string and then the user's browser settings.</p>

<h2>Form_builder Class</h2>
<p>The <a href="<?php 
echo user_guide_url('libraries/form_builder');
?>
">Form_builder class</a> is used throughout FUEL CMS to create the forms used to manage module data. To allow for the localized labels in the module forms, the <var>lang_prefix</var> property can be used and will look for labels in language files using the format <var>form_label_{literal}{field_name}{/literal}</var>, if not label value is supplied.</p>

<h2>Data_table Class</h2>
<p>Similar to the Form_builder class, the <a href="<?php 
echo user_guide_url('libraries/data_table');
?>
">Data_table class</a> also has a <var>lang_prefix</var> property. This prefix is used for localizing the table column headers. The prefix is set in FUEL to be the same as the Form_builder's which is <var>form_label_</var>.</p>


<h2>The js_localized Module Property</h2>
<p>The <a href="<?php 
echo user_guide_url('modules/simple');
?>
">js_localized</a> property can be added to your modules if you have have javascript that needs to use some localized text. 
	You can provide it an array of language key values and it will be added to the list of language keys that get translated into a JSON object for your javascript files to consume. 
	If you are using a <a href="<?php 
echo user_guide_url('general/javascript#jqx');
?>
">jqx</a> type controller that extends the BaseFuelController.js, 
	there will be a <var>localized property</var> and a lang() method on the controller that provides access to the JSON language object.</p>


开发者ID:scotton34,项目名称:sample,代码行数:28,代码来源:localization.php

示例15: model

<h1>Data Record Class Function Reference</h1>
<p>The Data_record class is the custom record object for the Table Class parent model (MY_Model). 
This provides a greater level of flexibility with your models by allowing you to create not only
methods on your model to retreive records from your datasource, but also the ability to create
derived attributes and lazy load other objects with each record returned.
This class is <strong>optional</strong>. If it it doesn't exist, then the Table Class parent model
will use either a standard generic class or an array depending on the return method specified.
</p>

<p class="important">Most module records in FUEL extend the <a href="<?=user_guide_url('libraries/base_module_model')?>">Base_module_record</a>
class which has some extended functionality for module records.</p>


<h2>$example_record->is_initialized()</h2>
<p>This method returns either <dfn>TRUE</dfn> or <dfn>FALSE</dfn> depending on if the record class has been properly intialized.</p>

<pre class="brush: php">
$record = $this->examples_model->create(); 
$record->is_initialized(); // Returns TRUE
</pre>

<h2>$example_record->set_fields(<var>fields</var>)</h2>
<p>Sets the fields of the oject ignoring those fields prefixed with an underscore.</p>

<pre class="brush: php">
$fields = array('id', 'name', 'email');
$record = $this->examples_model->set_fields($fields); 
</pre>

<h2>$example_record->id()</h2>
<p>Returns the id field name.</p>
开发者ID:rodrigowebe,项目名称:FUEL-CMS,代码行数:31,代码来源:data_record_class_functions.php


注:本文中的user_guide_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。