Permalink
Browse files

MINOR: Add comments for ThumbnailStripField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@106180 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent af428a9 commit b20a69dd04b2639eef4a2b21b8ba82bfd1cb857e @lingo lingo committed with sminnee Jun 3, 2010
Showing with 19 additions and 0 deletions.
  1. +19 −0 code/ThumbnailStripField.php
@@ -10,11 +10,28 @@ class ThumbnailStripField extends FormField {
protected $parentField;
protected $updateMethod;
+ /**
+ * If this is enabled, then ommitting a folderID when calling getimages will search ALL folders.
+ * This is the legacy behaviour.
+ *
+ * The new behaviour is to only search the root folder if a folderID is ommitted.
+ *
+ * @var boolean
+ */
protected static $use_legacy_image_search = false;
+ /**
+ * setter for ThumbnailStripField::use_legacy_image_search
+ * @param boolean $enable
+ */
public static function set_use_legacy_image_search($enable) {
self::$use_legacy_image_search = $enable;
}
+
+ /**
+ * getter for ThumbnailStripField::use_legacy_image_search
+ * @return boolean
+ */
public static function get_use_legacy_image_search() {
return self::$use_legacy_image_search;
}
@@ -42,6 +59,8 @@ function UpdateMethod() {
/**
* Populate the Thumbnail strip field, by looking for a folder,
* and the descendants of this folder.
+ *
+ * @see ThumbnailStripField::use_legacy_image_search
*/
function getimages() {
$result = '';

0 comments on commit b20a69d

Please sign in to comment.