ArticleTypeField::getConvertibleToTypes PHP Method

getConvertibleToTypes() public method

    public function getConvertibleToTypes()
    {
        return self::TypesConvertibleFrom($this->getType());
    }

Usage Example

Example #1
0
$articleTypeName = Input::Get('f_article_type');
$articleTypeFieldName = Input::Get('f_field_name');
$articleField = new ArticleTypeField($articleTypeName, $articleTypeFieldName);
$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Article Types"), "/{$ADMIN}/article_types/");
$crumbs[] = array($articleTypeName, '');
$crumbs[] = array(getGS("Article type fields"), "/{$ADMIN}/article_types/fields/?f_article_type=" . urlencode($articleTypeName));
$crumbs[] = array(getGS("Reassign a field type"), "");
echo camp_html_breadcrumbs($crumbs);
include_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/javascript_common.php";
$lang = camp_session_get('LoginLanguageId', 1);
$languageObj = new Language($lang);
// Verify the merge rules
$options = array();
$convertibleFromTypes = $articleField->getConvertibleToTypes();
foreach ($convertibleFromTypes as $type) {
    $options[$type] = ArticleTypeField::VerboseTypeName($type, $languageObj->getLanguageId());
}
?>
<script>
function UpdateArticleFieldContext() {
	var my_form = document.forms["add_field_form"]
	var field_type = my_form.elements["f_article_field_type"].value
	var is_topic = my_form.elements["is_topic"].value
	if ((is_topic == "false" && field_type == "topic")
			|| (is_topic == "true" && field_type != "topic")) {
		ToggleRowVisibility('topic_list')
		ToggleBoolValue('is_topic')
	}
}
All Usage Examples Of ArticleTypeField::getConvertibleToTypes