23     private function getAmdName(
$name) {
 
   24         $pieces = explode(
"/", 
$name); 
 
   25         if (count($pieces) <= 1 || $pieces[0] != 
'js') {
 
   30         $basename = basename(array_pop($pieces), 
".js"); 
 
   31         array_push($pieces, $basename); 
 
   33         return implode(
"/", $pieces); 
 
   45         $amdName = $this->getAmdName($viewName);
 
   47         if (!empty($amdName)) {
 
   48             $content = preg_replace(
'/^define\(([^\'"])/m', 
"define(\"$amdName\", \$1", 
$content, 1);
 
$content
Set robots.txt action.
 
if($guid==elgg_get_logged_in_user_guid()) $name
 
filter($viewName, $content)
Inserts the AMD name into $content and returns the new value.