# css-javascript-toolbox/12.0.5/models/fields/template-development-states.php

CSS &amp; JavaScript Toolbox, version 12.0.5. 44 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.5/code/models/fields/template-development-states.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.5/raw/models/fields/template-development-states.php
- Modified: 2025-10-06T13:35:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/12.0.5/code/models/fields/template-development-states.php#L10-L20`.

```php
<?php
/**
*
*/

// Import dependencies.
cssJSToolbox::import('framework:html:list.php', 'framework:db:mysql:xtable.inc.php');

/**
*
*/
class CJTTemplateDevelopmentStatesField extends CJTListField {

	/**
	* put your comment there...
	*
	*/
	protected function prepareItems() {
		if ((isset($this->options['result'])) && ($this->options['result'] == 'fullList')) {
			$this->items['release']['text'] = cssJSToolbox::getText('Release');
			$this->items['beta']['text'] = cssJSToolbox::getText('Beta');
			$this->items['alpha']['text'] = cssJSToolbox::getText('Alpha');
			$this->items['release-candidate']['text'] = cssJSToolbox::getText('Release Candidate');
			$this->items['revision']['text'] = cssJSToolbox::getText('Revision');
		}
		else {
			// Import dependencies.
			CJTxTable::import('template-revision');
			CJTxTable::import('author');
			$lastVersionFlag = CJTTemplateRevisionTable::FLAG_LAST_REVISION;
			$internalAuthorsFlag = CJTAuthorTable::FLAG_SYS_AUTHOR;
			$query = "SELECT DISTINCT(r.state) `text`
														FROM #__cjtoolbox_template_revisions r
														LEFT JOIN #__cjtoolbox_templates t
														ON  r.templateId = t.id
														LEFT JOIN #__cjtoolbox_authors a
														ON  t.authorId = a.id
														WHERE (r.attributes & {$lastVersionFlag}) AND (a.attributes & {$internalAuthorsFlag}) = 0
														ORDER BY `text`";
			$this->items = cssJSToolbox::getInstance()->getDBDriver()->select($query);
		}
	}

} // End class.
```
