protected function addProtectedAttributesToArray(array $attributes)
    {
        if ($this->protectedView) {
            foreach ($this->getProtectable() as $key) {
                if (isset($attributes[$key])) {
                    $attributes[$key] = $this->protectionMask;
                }
            }
        }

        return $attributes;
    }
protected function addProtectedAttributesToArray(array $attributes)
    {
        if ($this->protectedView) {
            foreach ($this->getProtectable() as $key) {
                if (isset($attributes[$key])) {
                    $attributes[$key] = $this->protectionMask;
                }
            }
        }

        return $attributes;
    }
protected function addProtectedAttributesToArray ( array $ attributes ) { if ( $ this -> protectedView ) { foreach ( $ this -> getProtectable ( ) as $ key ) { if ( isset ( $ attributes [ $ key ] ) ) { $ attributes [ $ key ] = $ this -> protectionMask ; } } } return $ attributes ; }
Replace all protected attributes in the given array with the mask

@param array $attributes
@return array
Replace all protected attributes in the given array with the mask