-
Склонировать d7dull в папку
/local/modules
-
Заменить названия во всех файлах с учётом регистра
maycat
— ваш ник, разрешены ТОЛЬКО латинские буквыd7dull
— название модуля Для этого нужно пройтись контекстным поиском по всей папке и внести изменения + переименовать файл в папке admin в соответствии с названияем модуля -
Продумать структуру классов и завести их в папке
lib/
(подробнее о приёмах организации структуры - смотри видео) С помощьюinclude.php
подключить автолоад созданным классам
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
global $USER; | |
// Получить Логин и Email пользователя 1С-Битрикс | |
$login = $USER->GetLogin(); | |
$email = $USER->GetEmail(); | |
// | |
// см: https://dev.1c-bitrix.ru/api_help/main/reference/cuser/getid.php | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/*** | |
* Подписать всех пользователей 1С-Битрикс на рассылку через Bitrix API | |
* чтобы исключить конкретного пользователя, нужно создать пользовательское поле UF_UNSUBSCRIBED типа CHECKBOX | |
* если в UF_UNSUBSCRIBED стоит галочка т.е. "UF_UNSUBSCRIBED" => true - то эту запись будем игнорировать | |
**/ | |
CModule::IncludeModule('iblock'); | |
CModule::IncludeModule("subscribe"); | |
$cUser = new CUser; | |
$sort_by = "ID"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { Route, Switch } from "react-router-dom" | |
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
<Route {...rest} render={props => ( | |
<Layout> | |
<Component {...props} /> | |
</Layout> | |
)} /> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var amqp = require('amqplib/callback_api'); | |
// if the connection is closed or fails to be established at all, we will reconnect | |
var amqpConn = null; | |
function start() { | |
amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
if (err) { | |
console.error("[AMQP]", err.message); | |
return setTimeout(start, 1000); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
class MyModel: ObservableObject { | |
@Published var attempted: Bool = false | |
@Published var firstname: String = "" { | |
didSet { updateDismissability() } | |
} | |
@Published var lastname: String = "" { |