please add proper PHPDoc to identify the type of $dialog