/*!
\static
Calls all publish functions.
342323
static function executePublish( $contentObjectID, $contentObjectVersion )
    {
        $functionName = 'publish';
        $params = array( $contentObjectID, $contentObjectVersion );

        self::executeHandlerFunction( $functionName, $params );
    }
1264802
private function publishFiles()
    {
        $publishTag = 'laravel2step';

        $this->publishes([
            __DIR__.'/config/laravel2step.php' => base_path('config/laravel2step.php'),
        ], $publishTag);

        $this->publishes([
            __DIR__.'/database/migrations/' => base_path('/database/migrations'),
        ], $publishTag);

        $this->publishes([
            __DIR__.'/public/css' => public_path('css/laravel2step'),
        ], $publishTag);

        $this->publishes([
            __DIR__.'/resources/assets/scss' => resource_path('assets/scss/laravel2step'),
        ], $publishTag);

        $this->publishes([
            __DIR__.'/resources/views' => resource_path('views/vendor/laravel2step'),
        ], $publishTag);

        $this->publishes([
            __DIR__.'/resources/lang' => base_path('resources/lang/vendor/laravel2step'),
        ], $publishTag);
    }
640300
public static function publish($task = 'publish', $alt = 'JTOOLBAR_PUBLISH', $check = false)
	{
		static::getRoot()->appendButton('Standard', 'publish', $alt, $task, $check);
	}
908316
private function publishResources()
    {
        $this->publishes([__DIR__.'/../../resources/config/defender.php' => config_path('defender.php')], 'config');
        $this->mergeConfigFrom(__DIR__.'/../../resources/config/defender.php', 'defender');
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'defender');
    }
1223911
protected function registerPublishes()
    {
        // Config
        $this->publishes(
            [
                __DIR__ . '/../../../config/config.php' => config_path('gzero.php'),
            ],
            'gzero-core config'
        );

        // Factories
        $this->publishes(
            [
                __DIR__ . '/../../../database/factories/UserFactory.php' => database_path('factories/gzero.php'),
            ],
            'gzero-core factories'
        );

        // Views
        $this->publishes(
            [
                __DIR__ . '/../../../resources/views' => resource_path('views/vendor/gzero-core'),
            ],
            'gzero-core views'
        );
    }
217448
public function publishBatch(Pubsub_PublishBatchRequest $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('publishBatch', array($params), "Pubsub_PublishBatchResponse");
  }
498927
private function _publishExtensionClientInit()
    {
        $extensionOptionsJson = json_encode(array(
            'hashMethod'                => is_string($this->hashMethod) ? $this->hashMethod : 'php callback function',
            'resourceTypes'             => $this->resourceTypes,
            'enableLog'                 => $this->enableLog,
            'activateOnAllPages'        => $this->activateOnAllPages,
            'alwaysReloadableResources' => $this->alwaysReloadableResources,
            'jsGlobalObjPublicPath'     => $this->jsGlobalObjPublicPath(),
            'clientVarName'             => $this->clientVarName,
        ));
        $this->_publishExtensionJs('%extensionObject%.initExtension(%optionsJson%); ', array(
            '%extensionObject%' => self::JS_GLOBAL_OBJ_PRIVATE_PATH,
            '%optionsJson%'     => $extensionOptionsJson,
        ));
    }
926120
protected function publishAll($load = true)
    {
        $this->publishConfig();
        $this->publishMigrations();
        $this->publishViews($load);
        $this->publishTranslations($load);
        $this->publishFactories();
    }
1007815
private function publishModule()
    {
        $from = base_path('vendor/typicms/'.$this->module.'/src');
        $to = base_path('Modules/'.ucfirst($this->module));

        if ($this->files->isDirectory($from)) {
            $this->publishDirectory($from, $to);
        } else {
            $this->error("Can’t locate path: <{$from}>");
        }

        $this->info('Publishing complete for module ['.ucfirst($this->module).']!');
    }
1238629
private function cmdPublish($args)
    {
        $cmd = new PublishCommand($this->cwd);

        return $cmd->run(array_slice($args, 1));
    }
75135
protected function registerPublishes(): void
    {
        $this->publishes([
            $this->packagePath('config') => config_path('/'),
        ], 'config');

        $this->publishes([
            $this->homeDirectory . '/../resources/lang' => base_path('resources/lang/vendor/' . $this->packageName),
        ], 'language');
    }
377403
protected function publishAll($assets)
    {
        if (empty($assets)) {
            return;
        }

        $store = $this->getAssetStore();
        foreach ($assets as $asset) {
            $store->publish($asset['Filename'], $asset['Hash']);
        }
    }
859014
protected function triggerPublish()
    {
        $this->info('Starting publishing vendor assets.');
        $this->call('vendor:publish');
        $this->info('Publishing vendor assets finished.');

        // Reload config
        $this->laravel['Illuminate\Foundation\Bootstrap\LoadConfiguration']->bootstrap($this->laravel);
    }
26950
public function postUpdate(LifecycleEventArgs $args): void
    {
        // Get the object and make sure it is what we need.
        $object = $args->getObject();
        if (!$object instanceof PublishableInterface) {
            return;
        }

        // Get the changeset from the unit of work.
        $uow = $args->getObjectManager()->getUnitOfWork();
        $changeset = $uow->getEntityChangeset($object);

        // If the published state changed fire the published event.
        if (isset($changeset['published'])
            && false === $changeset['published'][0]
            && true === $changeset['published'][1]) {
            $event = new EntityPublishedEvent($object);
            $this->event_dispatcher->dispatch(EntityPublishedEvent::NAME, $event);
        }
    }
1373084
function onPublish( $object, $nodes  )
    {
        $dataType = $this->dataType();
        if ( $dataType )
            $dataType->onPublish( $this, $object, $nodes );
    }
677765
function publish() {
  console.log('Client ' + clientId + ' is publishing to topic ' + topics.publish);
  // client.on('message',()=>{});
  // this is just for testing purpouse
  // maybe we dont need to stop and start publishing
  var timer = setInterval(function () {
    client.publish(topics.publish, 'ping');
    if (stopPub === true) {
      clearInterval(timer);
      stopPub = false;
    }
  }, 1000);
}
420135
protected function registerViewPublishCommand(): void
    {
        $this->app->singleton('command.view.publish', function (Application $app) {
            return new ViewPublishCommand($app->make('view.publisher'));
        });
    }