signUpGroups( 'org\wplake\acf_views\AcfGroups', __DIR__ . '/src/AcfGroups' ); $fieldIntegration = new FieldIntegration(); $cardDataIntegration = new CardDataIntegration($fieldIntegration); $itemIntegration = new ItemIntegration(); $metaFieldIntegration = new MetaFieldIntegration($fieldIntegration); $mountPointIntegration = new MountPointIntegration(); $taxFieldIntegration = new TaxFieldIntegration(); $toolsDataIntegration = new ToolsDataIntegration(); $fieldIntegration->setHooks(); $cardDataIntegration->setHooks(); $itemIntegration->setHooks(); $metaFieldIntegration->setHooks(); $mountPointIntegration->setHooks(); $taxFieldIntegration->setHooks(); $toolsDataIntegration->setHooks(); } protected function all(): void { $groupCreator = new Creator(); $acfViewData = $groupCreator->create(AcfViewData::class); $acfCardData = $groupCreator->create(AcfCardData::class); $item = $groupCreator->create(Item::class); $options = new Options(); $settings = new Settings($options); $html = new Html(); $fields = new Fields(); $queryBuilder = new QueryBuilder(); $cache = new Cache($acfViewData, $acfCardData); $twig = new Twig(); $cardMarkup = new CardMarkup($queryBuilder); $viewMarkup = new ViewMarkup($html, $fields); $acfViewFactory = new AcfViewFactory($cache, $viewMarkup, $twig, $fields); $acfCardFactory = new AcfCardFactory($queryBuilder, $cardMarkup, $twig); $plugin = new Plugin($viewMarkup, $cardMarkup, $options, $cache, $acfViewFactory, $acfCardFactory); $acfViews = new AcfViews($html, $viewMarkup, $plugin, $cache); $acfCards = new AcfCards($html, $plugin, $queryBuilder, $cardMarkup, $cache); $demoImport = new DemoImport($acfViews, $settings, $item, $acfCards, $cache); $acfIntegration = new AcfIntegration(); $dashboard = new Dashboard($plugin, $html, $demoImport, $acfIntegration); $acfPro = new AcfPro($plugin); $upgrades = new Upgrades($plugin, $settings, $cache, $acfViews, $acfCards); $activeInstallations = new ActiveInstallations($plugin, $settings, $options); $shortcodes = new Shortcodes($acfViewFactory, $acfCardFactory, $cache); $tools = new Tools(new ToolsData($groupCreator), $cache, $plugin, $acfViewData, $acfCardData); // load right here, as used everywhere $settings->load(); $plugin->setHooks(); $acfViews->setHooks(); $dashboard->setHooks(); $demoImport->setHooks(); $acfCards->setHooks(); $acfPro->setHooks(); $upgrades->setHooks(); $activeInstallations->setHooks(); $shortcodes->setHooks(); $tools->setHooks(); } public function init(): void { // skip initialization if PRO already active if (class_exists(Plugin::class)) { return; } require_once __DIR__ . '/prefixed_vendors/vendor/scoper-autoload.php'; $this->acfGroups(); $this->all(); } }; $acfViews->init();