| bool | Add new comment | |
FieldtypeComments::checkVoteAction() FieldtypeComments::checkVoteAction($page) FieldtypeComments::checkVoteAction($page) | array | Check the request for a vote action | |
FieldtypeComments::count() FieldtypeComments::count($selectorString) FieldtypeComments::count($selectorString, $field = null) | int | Given a field and a selector, return total quantity of comments matching the selector | |
| bool | Delete a given comment | |
FieldtypeComments::deleteField() FieldtypeComments::deleteField(Field $field) FieldtypeComments::deleteField(Field $field) | bool | Delete the given field, which implies: drop the table $field->table | |
FieldtypeComments::exportValue() FieldtypeComments::exportValue(Page $page, Field $field, $value) FieldtypeComments::exportValue(Page $page, Field $field, $value, array $options = []) | array | Export value | |
FieldtypeComments::find() FieldtypeComments::find($selectorString) FieldtypeComments::find($selectorString, $field = null, array $options = []) | CommentArray int | Given a field and a selector, find all comments matching the selector | |
| CommentArray | Find comments, static version for backwards compatibility | |
FieldtypeComments::getBlankValue() FieldtypeComments::getBlankValue($page, $field) FieldtypeComments::getBlankValue($page, $field) | WireArray | Per Fieldtype interface, return a blank value of this Fieldtype | |
| Comment null | Given a comment code or subcode, return the associated comment ID or 0 if it doesn't exist | |
| Comment null | Get a comment by ID or NULL if not found | |
| CommentArray | Get parent comments for given Comment | |
| array Field null | Return comments field(s) | |
FieldtypeComments::getConfigInputfields() FieldtypeComments::getConfigInputfields(Field $field) FieldtypeComments::getConfigInputfields(Field $field) | InputfieldWrapper | Configuration that appears with each Comments fieldtype | |
FieldtypeComments::getDatabaseSchema() FieldtypeComments::getDatabaseSchema(Field $field) FieldtypeComments::getDatabaseSchema(Field $field) | array | Schema for the Comments Fieldtype | |
FieldtypeComments::getFieldClass() FieldtypeComments::getFieldClass() FieldtypeComments::getFieldClass(array $a = []) | string | Get class name to use Field objects of this type (must be class that extends Field class) | |
FieldtypeComments::getInputfield() FieldtypeComments::getInputfield($page, $field) FieldtypeComments::getInputfield($page, $field) | Inputfield null | Return new instance of the Inputfield module associated with this Fieldtype. | |
FieldtypeComments::getLoadQueryAutojoin() FieldtypeComments::getLoadQueryAutojoin(Field $field, DatabaseQuerySelect $query) FieldtypeComments::getLoadQueryAutojoin(Field $field, DatabaseQuerySelect $query) | null | For FieldtypeMulti interface, return NULL to indicate that the field is not auto-joinable | |
FieldtypeComments::getMatchQuery() FieldtypeComments::getMatchQuery(PageFinderDatabaseQuerySelect $query, string $table, string $subfield, string $operator, mixed $value) FieldtypeComments::getMatchQuery(PageFinderDatabaseQuerySelect $query, string $table, string $subfield, string $operator, mixed $value) | DatabaseQuery DatabaseQuerySelect | Update a query to match the text with a fulltext index | |
FieldtypeComments::getNotifyEmails() FieldtypeComments::getNotifyEmails(Page $page, Field $field) FieldtypeComments::getNotifyEmails(Page $page, Field $field, $comment = null) | array | Get emails (and other data) of people that should be notified for a given Page’s comments | |
| int | Get number of comments for Page, optionally limited by specific $options | |
FieldtypeComments::importValue() FieldtypeComments::importValue(Page $page, Field $field, array $value) FieldtypeComments::importValue(Page $page, Field $field, array $value, array $options = []) | array string | Import value | |
FieldtypeComments::sanitizeValue() FieldtypeComments::sanitizeValue($page, $field, $value) FieldtypeComments::sanitizeValue($page, $field, $value) | WireArray | Per the Fieldtype interface, sanitize the combined value for use in a Page | |
FieldtypeComments::savePageField() FieldtypeComments::savePageField(Page $page, Field $field) FieldtypeComments::savePageField(Page $page, Field $field) | bool | Per the Fieldtype interface, Save the given Field from the given Page to the database | |
FieldtypeComments::sendNotifyEmails() FieldtypeComments::sendNotifyEmails(Page $page, Field $field, $comment, array $emailsData) FieldtypeComments::sendNotifyEmails(Page $page, Field $field, $comment, array $emailsData) | int | Get emails (and other data) of people that should be notified for a given Page’s comments | |
FieldtypeComments::sleepValue() FieldtypeComments::sleepValue(Page $page, Field $field, $value) FieldtypeComments::sleepValue(Page $page, Field $field, $value) | array | Given an 'awake' value, as set by wakeupValue, convert the value back to a basic type for storage in DB. | |
| bool | Update specific properties for a comment | |
| bool | Add a vote to the current comment from the current user/IP | |
FieldtypeComments::wakeupValue() FieldtypeComments::wakeupValue(Page $page, Field $field, $value) FieldtypeComments::wakeupValue(Page $page, Field $field, $value) | CommentArray | Given a raw value (value as stored in DB), return the value as it would appear in a Page object | |
FieldtypeComments::wired() FieldtypeComments::wired() FieldtypeComments::wired() | (nothing) | | |