Class Comments_model - echiong/testRepo GitHub Wiki
##Class Comments_model
Comments_model handles comments to a component like feats, showcase, beats, and voices
Package: [[application<a href="Package application.models.md">models]]
Extends:
CI_Model
Located at application/models/comments_model.php
##Methods summary
public integer create ( array $data )
Creates a comment record for a component.
Parameters
$data
array
$data This contains the fields to be inserted in the Comments table
Returns
integer
- id record created
Used by Components::comment()
public object get_by_component ( string $component, integer $componentID, boolean $select = false )
Get comment records from a component.
Parameters
$component
string
$component the component like feats, showcase, beats, and voices
$componentID
integer
$componentID the component ID
$select
boolean
$select this is optional
Returns
object
result object
Used by Feats::details() Showcases::details() Components_model::get() Components_model::get() Showcases::details()
public boolean delete_by_component ( string $component, integer $componentID )
Comment records deletion by component.
Parameters
$component
string
$component the component like feats, showcase, beats, and voices
$componentID
integer
$componentID the component ID
Returns
boolean
True on success False on failure
Used by Components::delete()
Methods inherited from CI_Model
__construct()
__get()