public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
public function filter ( $ value ) { if ( $ value instanceof VisibilityInterface && ! $ this -> builder -> isVisibilityAllowed ( $ value -> getVisibility ( ) ) ) { return null ; } return $ value ; }
Filter Descriptor with based on visibility.

@param DescriptorAbstract $value

@return DescriptorAbstract|null
Filter Descriptor with based on visibility .