public function publishNewType(Type $toType, $newStatus)
{
$this->contentTypeGateway->publishTypeAndFields($toType->id, $toType->status, Type::STATUS_MODIFIED);
$script = \eZScheduledScript::create('syncobjectattributes.php', \eZINI::instance('ezscriptmonitor.ini')->variable('GeneralSettings', 'PhpCliCommand') . ' extension/ezscriptmonitor/bin/' . \eZScheduledScript::SCRIPT_NAME_STRING . ' -s ' . \eZScheduledScript::SITE_ACCESS_STRING . ' --classid=' . $toType->id);
$script->store();
}