/**
* Check if the Firm is supported in this display context.
*
* @param Firm $firm
*
* @return bool
*/
public function checkFirm(Firm $firm)
{
if ($this->firm_id) {
return $firm->id == $this->firm_id;
}
if ($this->subspecialty_id) {
$firm_subspecialty = $firm->getSubspecialty();
return $firm_subspecialty && $firm_subspecialty->id == $this->subspecialty_id;
}
// no restriction on firm or subspecialty
return true;
}