定制 comtocode/ctc-socialnetworkimportbundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

comtocode/ctc-socialnetworkimportbundle

最新稳定版本:v1.0.11

Composer 安装命令:

composer require comtocode/ctc-socialnetworkimportbundle

包简介

This bundle is used to import social feeds (facebook, twitter, instagram, youtube,...) into Ibexa DXP content

README 文档

README

This bundle is used to import social feeds (Facebook, Twitter, Instagram, YouTube, ...) into Ibexa DXP 5 content.

Requirements

  • PHP >= 8.2
  • Ibexa DXP 5.x
  • Symfony 7.x

Installation

composer require comtocode/ctc-socialnetworkimportbundle

Register the bundle in config/bundles.php:

return [
    // ...
    CTC\SocialNetworkImportBundle\CTCSocialNetworkImportBundle::class => ['all' => true],
];

Configuration

Add your configuration in config/packages/ctc_social_network_import.yaml:

ctc_social_network_import:
    params:
        storageDir: "%kernel.project_dir%/var/import"
        limit: 10
        parentLocationId: 2
        contentType: "social_network"
        language: "fre-FR"
    services_enabled:
        - facebook
        - twitter
        - instagram
        - youtube
    services_list:
        facebook:
            # ...
        twitter:
            # ...
        instagram:
            # ...
        youtube:
            # ...

Usage

Import feeds

php bin/console ctc:sn:import

Available options:

  • --dry-run=true — test the app without writing anything
  • --social=NETWORK_NAME — import a specific social feed only
  • --import-only=true — get feeds but do not create Ibexa content

Delete imported content

php bin/console ctc:sn:delete_subtree

Twig functions

{# Get live feed with pagination #}
{% set feed = getLiveFeed(1, 10) %}

{# Get a specific social item #}
{% set item = getSocialItem('twitter') %}

Migration from eZ Platform 2.5

This version has been fully migrated to Ibexa DXP 5 / Symfony 7:

  • All eZ\Publish\* namespaces replaced with Ibexa\* equivalents
  • ContainerAwareCommand replaced with proper dependency injection
  • \Twig_Extension replaced with Twig\Extension\AbstractExtension
  • TreeBuilder API updated for Symfony 7 compatibility
  • Service definitions modernized (FQCN service IDs, no container parameters for classes)
  • PHP 8.2+ features (typed properties, constructor promotion, match expressions, static return types)
  • services.yml renamed to services.yaml
  • eZSNUtils renamed to IbexaSNUtils
  • All $container->get() / getContainer() calls removed in favor of constructor injection
  • execute() methods return int (Symfony Console requirement)
  • #[AsCommand] PHP attribute used for command registration

统计信息

  • 总下载量: 3.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固