Conditionally Show RelationManager in a View

Is there a way to only show the relation manager tab below on a resource page if a certain property in the model is equal to a value? The getRelations method doesn't seem to accept any arguments. I have quite a few hasMany relationships for my main page/model and would like to eliminate a few of the tabs where they are not applicable. For example, I have an AccountResource page. The account has 10 hasMany relationships to which I’ve created relationship managers and added them to the getRelations static function. If the account is type “A” for example, only 7 of them are applicable. If the account is type “B” a different set of 8 are applicable. Can this be done?
1 Reply