Changes between Version 5 and Version 6 of Documentation/Community/Document/Development/Tutorial/Version3
- Timestamp:
- 12/22/11 00:34:35 (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/Community/Document/Development/Tutorial/Version3
v5 v6 131 131 }}} 132 132 133 Remember that the method ''value()'' belongs to a field, that is a class implementing ''EBox::Types::Abstract''. A row is composed of several fields. In our model, these fields are: ''module'', ''enabled'' and a new field ''current'' of type ''EBox::Types:: CurrentStatus'' that we are creating now. We are interested in fetching the value of the field ''module'' within the field ''current''. The method ''row()'' within a given field returns ''undef'' or the row this field belongs to, once we have the row we get the value of the field ''module'' in that row by running ''valueByName('module')'' from the row object.133 Remember that the method ''value()'' belongs to a field, that is a class implementing ''EBox::Types::Abstract''. A row is composed of several fields. In our model, these fields are: ''module'', ''enabled'' and a new field ''current'' of type ''EBox::Types::!CurrentStatus'' that we are creating now. We are interested in fetching the value of the field ''module'' within the field ''current''. The method ''row()'' within a given field returns ''undef'' or the row this field belongs to, once we have the row we get the value of the field ''module'' in that row by running ''valueByName('module')'' from the row object. 134 134 135 135 Once we have the name of the module we only need to check if the file ''/etc/apache2/mods-enabled/$name.load'' exists; this we do in the last line of the method.