Possible to only disable controls when editing page types?

Permalink 1 user found helpful
Is it possibly to do something like:

$a = new Area('header nav');
$a->disableControls($c);
$a->display($c);

But only enable the controls if editing the general page type, and not just a page using the page type?

 
jordanlev replied on at Permalink Reply
jordanlev
I assume you mean that you only want to enable controls when editing the "Page Defaults" -- if so, I think you can do this:
$a = new Area('header nav');
if ($c->getMasterCollectionID() != $c->getCollectionID()) {
  $a->disableControls($c);
}
$a->display($c);
mesuva replied on at Permalink Reply
mesuva
Was just looking for this, cheers grand master JL.