code/objects/Website.php
/**
     * Create a {@link NotificationRecord} relating to this website with the HTTP code.
     *
     * @param null $code
     * @return bool
     */
Create a  NotificationRecord relating to this website with the HTTP code.
@param null $code
@return bool
Create a NotificationRecord relating to this website with the HTTP code . @param null $code @return bool
private function recordError($code = null)
    {
        if ($code === null) {
            $code = 'Unresolved Error Code';
        }
        $notification = NotificationRecord::create();
        $notification->Code = $code;
        if ($notification->write()) {
            $this->NotificationRecords()->add($notification);
            if ($this->NotificationRecords()->filter('ID', $notification->ID)->first()) {
                return true;
            }
        }
        return false;
    }
private function recordError ( $ code = null ) { if ( $ code === null ) { $ code = 'Unresolved Error Code' ; } $ notification = NotificationRecord :: create ( ) ; $ notification -> Code = $ code ; if ( $ notification -> write ( ) ) { $ this -> NotificationRecords ( ) -> add ( $ notification ) ; if ( $ this -> NotificationRecords ( ) -> filter ( 'ID' , $ notification -> ID ) -> first ( ) ) { return true ; } } return false ; }
Create a {@link NotificationRecord} relating to this website with the HTTP code.
Create a { @link NotificationRecord } relating to this website with the HTTP code .