classes/Models/Element.php
public function img()
    {
        // Check for an existing Image relation
        if (($image = $this->parentImg($this->inputName()))
            && $image->exists) {

            // If the Image represents a default image, but doesn't match the current
            // item from the config, trash the current one and build the new default
            // image.
            if ($replacement = $this->getReplacementImage($image)) {
                return $replacement;
            }

            // Return the found image
            return $image;
        }

        // Else return a default image
        return $this->defaultImage();
    }
public function img()
    {
        // Check for an existing Image relation
        if (($image = $this->parentImg($this->inputName()))
            && $image->exists) {

            // If the Image represents a default image, but doesn't match the current
            // item from the config, trash the current one and build the new default
            // image.
            if ($replacement = $this->getReplacementImage($image)) {
                return $replacement;
            }

            // Return the found image
            return $image;
        }

        // Else return a default image
        return $this->defaultImage();
    }
public function img ( ) { // Check for an existing Image relation if ( ( $ image = $ this -> parentImg ( $ this -> inputName ( ) ) ) && $ image -> exists ) { // If the Image represents a default image, but doesn't match the current // item from the config, trash the current one and build the new default // image. if ( $ replacement = $ this -> getReplacementImage ( $ image ) ) { return $ replacement ; } // Return the found image return $ image ; } // Else return a default image return $ this -> defaultImage ( ) ; }
Look for default iamges using a named key. It was a lot simpler in the
integeration with the Elements admin UI to store the input name in the
"name" attribute

@return Image
Look for default iamges using a named key . It was a lot simpler in the integeration with the Elements admin UI to store the input name in the name attribute