anzui/metamodels_openimmo
Composer 安装命令:
composer require anzui/metamodels_openimmo
包简介
Import OpenImmo-Data into an existing MetaModel (for Contao CMS)
关键字:
README 文档
README

This module makes it possible to import OpenImmo-Data into an existing MetaModel.
Installation
The contents of the contao folder needs to be placed within the folder system/modules/metamodels_openimmo/, while the the src folder needs to go to composer/anzui/metamodels_openimmo/src.
Import the Template
You can save a lot of time and work by importing the pre-made template.
It consists of the MetaModel "immo" and pre-configured attributes and the corresponding MetaModel-OpenImmo link.
- In the Backend under "MetaModels - OpenImmo > Settings" select the MetaModels-Version you have installed.
- Hit "Import Template" and you will get a good starting point for your object catalog.
Warning: Importing the template will erase all of your existing MetaModels and MetaModels-OpenImmo links.
Usage
- Create your metamodel
- In the Backend under "MetaModels - OpenImmo > Links" add a new MetaModel-OpenImmo link
- Select the folder in which the object-data will be uploaded to by your Software
- Select the folder in which file attachments for object should be stored
- Link each field in your metamodel to an OpenImmo field.
- Setup the upload of your object data in your Software to upload the files in the directory you selected in step 3
Synchronising
- Trigger uploading of the data in your software
- In the Backend unter "MetaModels - OpenImmo > Links" click on the "sync" icon
- Select the data-file to sync, by default the oldest unsynced file will be selected
- hit the "Sync" button, if it is a zip file it gets unpacked and you must hit the "Sync" button again
- The data is now synced with your database
Automation
For each MetaModels-OpenImmo Link you can configure automatic syncing and deletion of old files.
This automation uses Contao's cron service. By default it requires the page to be called by any web browser regulary to work.
You can also setup Contao's cron service to be executed by your systems cron.
Field Callbacks
You can add a callback function to each field-link.
It will be passed the value from the XML, the field object, the immo-array, the xml tree, the current xpath and the metamodel attribute.
It must return the value to be set on the field.
public static function fieldCallback($value, $field_obj, &$immo, &$xml, $xpath, $metamodelAttribute)
{
...
return $value;
}
Hooks
MetaModels - OpenImmo provides a hook that is called for each item that will be synced with the database
$GLOBALS['TL_HOOKS']['metaModelsOpenImmoSync'][] = array('MyClass', 'myMethod')
It gets passed an array containing all synced fields and the original XML tree for that particular object within the _xml_ key of the array.
It must return the array. Every modification you made to it will be stored in the database.
anzui/metamodels_openimmo 适用场景与选型建议
anzui/metamodels_openimmo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 49 次下载、GitHub Stars 达 9, 最近一次更新时间为 2016 年 08 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「contao」 「metamodels」 「openimmo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 anzui/metamodels_openimmo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 anzui/metamodels_openimmo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 anzui/metamodels_openimmo 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Contao Open Source CMS
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Starter MetaModels bundle
Frontend support for the MultiColumnWizard
Implementation of carouFredSel as extension for Contao Open Source CMS
Contao CMS integrity check for some files
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2016-08-18