/** * Find material record by identifier * @param \samsonframework\orm\QueryInterface Query object * @param string $identifier Material identifier * @param mixed $return Found material is returned here * @return bool True if material was found by identifier */ public static function byId(\samsonframework\orm\QueryInterface $query, $identifier, &$return = null) { // Get material safely if ($query->id($identifier)->first($return)) { return true; } else { // Material not found return false; } }