\HtmlEditorField_LinkObjects
Extension of the HtmlEditorField_Toolbar to add the ability to link to DataObjects on the site
Synopsis
class HtmlEditorField_LinkObjects
extends DataObject
{
- // members
- private static array $linkable_objects = ;
- private static string $linkable_interface = 'Linkable';
- // methods
- public void __construct()
- public static boolean addLinkableObject()
- public static boolean removeLinkableObject()
- public array getLinkableObjects()
- public static void object_link()
Hierarchy
Extends
- DataObject
Members
private
- $linkable_interface
-
$linkable_objects
The linkable_objects array stores a list of all the objects which should be able to be linked to.
Methods
public
- __construct() — The construct function can optionally take an array of objects to add to $linkable_objects and a boolean variable which decides whether to overwrite the $linkable_objects field or simply add the array values to it.
- addLinkableObject() — This function will add an object to the array of Linkable objects.
- getLinkableObjects() — A function to simply return the array of linkable objects
- object_link()
- removeLinkableObject() — This function tries to remove an object from the linkable_objects array, and returns true or false depending on its success.