/** * @param mixed $object * * @return bool */ public function canHandle($object) { if (parent::canHandle($object) && ($object instanceof File || strpos($object->getContentType(), 'image') === 0)) { return true; } return false; }
/** * @param mixed $object * * @return bool */ public function canHandle($object) { if (parent::canHandle($object) && ($object instanceof Media && $object->getContentType() == 'application/pdf')) { return true; } return false; }