Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezcontentobjectstategrouplanguage.php
Go to the documentation of this file.
1 <?php
21 class eZContentObjectStateGroupLanguage extends eZPersistentObject
22 {
23 public $Description;
24 public $RealLanguageID;
25 static function definition()
26 {
27 static $definition = array( "fields" => array( "contentobject_state_group_id" => array( "name" => "ContentObjectStateGroupID",
28 "datatype" => "integer",
29 "required" => false,
30 "foreign_class" => "eZContentObjectStateGroup",
31 "foreign_attribute" => "id",
32 "multiplicity" => "1..*" ),
33 "name" => array( "name" => "Name",
34 "datatype" => "string",
35 "required" => false ),
36 "description" => array( "name" => "Description",
37 "datatype" => "text",
38 "required" => false ),
39 "real_language_id" => array( "name" => "RealLanguageID",
40 "datatype" => "integer",
41 "required" => true ),
42 "language_id" => array( "name" => "LanguageID",
43 "datatype" => "integer",
44 "required" => false ) ),
45 "keys" => array( "contentobject_state_group_id",
46 "real_language_id" ),
47 "function_attributes" => array( "language" => "language",
48 "is_valid" => "isValid"
49 ),
50 "increment_key" => false,
51 "class_name" => "eZContentObjectStateGroupLanguage",
52 "sort" => array(),
53 "name" => "ezcobj_state_group_language" );
54 return $definition;
55 }
56
63 public static function fetchByGroup( $id )
64 {
65 return eZPersistentObject::fetchObjectList( eZContentObjectStateGroupLanguage::definition(), null, array( 'contentobject_state_group_id' => $id ) );
66 }
67
74 public function isValid( &$messages = array() )
75 {
76 $isValid = true;
77 if ( isset( $this->Name ) && strlen( $this->Name ) > 45 )
78 {
79 $messages[] = ezpI18n::tr( 'kernel/state/edit', 'Name in %language_name is too long. Maximum 45 characters allowed.', null, array( '%language_name' => $this->language()->attribute( 'locale_object' )->attribute( 'intl_language_name' ) ) );
80 $isValid = false;
81 }
82
83 if ( ( !isset( $this->Name ) || $this->Name == '' ) && $this->Description != '' )
84 {
85 $messages[] = ezpI18n::tr( 'kernel/state/edit', 'Name in %language_name: input required', null, array( '%language_name' => $this->language()->attribute( 'locale_object' )->attribute( 'intl_language_name' ) ) );
86 $isValid = false;
87 }
88
89 return $isValid;
90 }
91
97 public function language()
98 {
99 return eZContentLanguage::fetch( $this->RealLanguageID );
100 }
101
107 public function hasData()
108 {
109 return ( isset( $this->Name) && trim( $this->Name ) != '' ) || ( isset( $this->Description ) && trim( $this->Description ) != '' );
110 }
111
117 public function realLanguageID()
118 {
119 return $this->RealLanguageID;
120 }
121
122
123 }
124 ?>
eZContentLanguage\fetch
static fetch( $id)
Definition: ezcontentlanguage.php:252
eZContentObjectStateGroupLanguage
Definition: ezcontentobjectstategrouplanguage.php:22
eZContentObjectStateGroupLanguage\$Description
$Description
Definition: ezcontentobjectstategrouplanguage.php:23
eZContentObjectStateGroupLanguage\realLanguageID
realLanguageID()
Definition: ezcontentobjectstategrouplanguage.php:117
eZContentObjectStateGroupLanguage\language
language()
Definition: ezcontentobjectstategrouplanguage.php:97
eZContentObjectStateGroupLanguage\isValid
isValid(&$messages=array())
Definition: ezcontentobjectstategrouplanguage.php:74
eZContentObjectStateGroupLanguage\definition
static definition()
Definition: ezcontentobjectstategrouplanguage.php:25
eZContentObjectStateGroupLanguage\fetchByGroup
static fetchByGroup( $id)
Definition: ezcontentobjectstategrouplanguage.php:63
eZContentObjectStateGroupLanguage\$RealLanguageID
$RealLanguageID
Definition: ezcontentobjectstategrouplanguage.php:24
eZContentObjectStateGroupLanguage\hasData
hasData()
Definition: ezcontentobjectstategrouplanguage.php:107
eZPersistentObject
Definition: ezpersistentobject.php:34
eZPersistentObject\attribute
attribute( $attr, $noFunction=false)
Definition: ezpersistentobject.php:1330
eZPersistentObject\fetchObjectList
static fetchObjectList( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
Definition: ezpersistentobject.php:807
$id
$id
Definition: companytypelist.php:193
$messages
$messages
Definition: homepage.php:328
Name
if($user) if(isset( $next) && $next)<?=isset($all_fields_error) &&$all_fields_error ?><?=isset($password_error) &&$password_error ?></p ><? endif;?>< form method="post">< table border="0" cellspacing="2" cellpadding="2" class="boxtext" style="font-size=13;">< tr >< td style="color:<?= isset( $error['first_name'] ) ?> First Name
Definition: step1.php:127
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.