getLanguages() public method

Return all languages used in the publication as an array of Language objects.
public getLanguages ( integer $p_excludeLanguageId = null, array $p_order = [], $p_published = false ) : array
$p_excludeLanguageId integer If greater than 0, exclude the language with the given identifier from the list.
$p_order array The array of order directives in the format: array('field'=>field_name, 'dir'=>order_direction) field_name can take one of the following values: bynumber, byname, byenglish_name, bycode order_direction can take one of the following values: asc, desc
return array
コード例 #1
0
ファイル: do_add.php プロジェクト: nistormihai/Newscoop
	exit;
}

$f_user_id = Input::Get('f_user_id', 'int', 0);
$f_publication_id = Input::Get('f_publication_id', 'int', 0);
$f_subscription_id = Input::Get('f_subscription_id', 'int', 0);
$f_section_number = Input::Get('f_section_number', 'array', array());
$f_section_id = Input::Get('f_section_id', 'array', array());
$f_language_set = Input::Get('f_language_set', 'string', 'all');
$f_subscription_start_date = Input::Get('f_subscription_start_date');
$f_subscription_days = Input::Get('f_subscription_days');
$success = true;

$publicationObj = new Publication($f_publication_id);
$languageObj = new Language($publicationObj->getDefaultLanguageId());
$languages = $publicationObj->getLanguages();
$manageUser = new User($f_user_id);
$errorMsgs = array();

$new_sections = array();
if ($f_language_set == 'all') {
	if (is_array($f_section_number)) {
		foreach ($f_section_number as $section_number) {
			$new_sections[$section_number][] = 0;
		}
	}
} else {
	if (is_array($f_section_id)) {
		foreach ($f_section_id as $section_id) {
			$id = explode('_', $section_id);
			$new_sections[$id[0]][] = $id[1];