ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilTermsOfServiceAgreementByLanguageProvider Class Reference
+ Inheritance diagram for ilTermsOfServiceAgreementByLanguageProvider:
+ Collaboration diagram for ilTermsOfServiceAgreementByLanguageProvider:

Public Member Functions

 __construct (ilLanguage $lng)
 
 setSourceDirectories ($terms_of_service_source_directories)
 
 getSourceDirectories ()
 
 setLanguageAdapter ($lng)
 
 getLanguageAdapter ()
 
 getList (array $params, array $filter)
 {
Parameters
array$paramsTable paramaters like limit or order
array$filterFilter settings
Returns
array
} More...
 
 getList (array $params, array $filter)
 

Protected Member Functions

 initSourceDirectories ()
 
 collectData ()
 

Protected Attributes

 $lng
 
 $data = array()
 
 $source_directories = array()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTermsOfServiceAgreementByLanguageProvider::__construct ( ilLanguage  $lng)

Member Function Documentation

◆ collectData()

ilTermsOfServiceAgreementByLanguageProvider::collectData ( )
protected

Definition at line 97 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

98 {
99 $i = 0;
100 foreach($this->getLanguageAdapter()->getInstalledLanguages() as $iso2_language_code)
101 {
102 $this->data['items'][$i]['language'] = $iso2_language_code;
103 $this->data['items'][$i]['agreement'] = false;
104 $this->data['items'][$i]['agreement_document'] = null;
105 $this->data['items'][$i]['agreement_document_modification_ts'] = null;
106
107 foreach($this->getSourceDirectories() as $directory)
108 {
109 $file = $directory . '/agreement_' . $iso2_language_code . '.html';
110 if(is_file($file) && is_readable($file))
111 {
112 $this->data['items'][$i]['agreement_document'] = $file;
113 $this->data['items'][$i]['agreement_document_modification_ts'] = filemtime($file);
114 $this->data['items'][$i]['agreement'] = true;
115 break;
116 }
117 }
118
119 ++$i;
120 }
121
122 $this->data['cnt'] = $i;
123 }
print $file

References $file, getLanguageAdapter(), and getSourceDirectories().

Referenced by getList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLanguageAdapter()

ilTermsOfServiceAgreementByLanguageProvider::getLanguageAdapter ( )
Returns
ilLanguage

Definition at line 63 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

References $lng.

Referenced by collectData().

+ Here is the caller graph for this function:

◆ getList()

ilTermsOfServiceAgreementByLanguageProvider::getList ( array  $params,
array  $filter 
)

{

Parameters
array$paramsTable paramaters like limit or order
array$filterFilter settings
Returns
array
}

Implements ilTermsOfServiceTableDataProvider.

Definition at line 82 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

References $data, and collectData().

+ Here is the call graph for this function:

◆ getSourceDirectories()

ilTermsOfServiceAgreementByLanguageProvider::getSourceDirectories ( )
Returns
array

Definition at line 47 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

References $source_directories.

Referenced by collectData().

+ Here is the caller graph for this function:

◆ initSourceDirectories()

ilTermsOfServiceAgreementByLanguageProvider::initSourceDirectories ( )
protected

Definition at line 71 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

72 {
73 $this->source_directories = array(
74 implode('/', array('.', 'Customizing', 'clients', CLIENT_ID, 'agreement')),
75 implode('/', array('.', 'Customizing', 'global', 'agreement'))
76 );
77 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setLanguageAdapter()

ilTermsOfServiceAgreementByLanguageProvider::setLanguageAdapter (   $lng)
Parameters
ilLanguage$lng

Definition at line 55 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

56 {
57 $this->lng = $lng;
58 }

References $lng.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSourceDirectories()

ilTermsOfServiceAgreementByLanguageProvider::setSourceDirectories (   $terms_of_service_source_directories)
Parameters
array$terms_of_service_source_directories

Definition at line 39 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

40 {
41 $this->source_directories = $terms_of_service_source_directories;
42 }

Field Documentation

◆ $data

ilTermsOfServiceAgreementByLanguageProvider::$data = array()
protected

Definition at line 20 of file class.ilTermsOfServiceAgreementByLanguageProvider.php.

Referenced by getList().

◆ $lng

ilTermsOfServiceAgreementByLanguageProvider::$lng
protected

◆ $source_directories

ilTermsOfServiceAgreementByLanguageProvider::$source_directories = array()
protected

The documentation for this class was generated from the following file: