/**
  * Encode selected values for react
  *
  * @return array
  */
 protected function getEncodedItems()
 {
     $assetAdmin = AssetAdmin::singleton();
     $fileData = [];
     foreach ($this->getItems() as $file) {
         $fileData[] = $assetAdmin->getObjectFromData($file);
     }
     return $fileData;
 }
 public function updateCMSEditLink(&$link)
 {
     // Update edit link for this file to point to the new asset admin
     $controller = AssetAdmin::singleton();
     $link = Director::absoluteURL($controller->getFileEditLink($this->owner));
 }