You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+87Lines changed: 87 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ composer install trms/carousel
30
30
31
31
[Bulletins](#bulletin)
32
32
33
+
[Bulletin & Template Blocks](#bulletinblock)
34
+
33
35
[Groups](#group)
34
36
35
37
[Media](#media)
@@ -247,6 +249,91 @@ A template is the starting point for a standard Bulletin and is comprised of a b
247
249
|PreviewImageUrl|string|A low resolution rendering of the template|
248
250
|FullImageUrl|string|A full resolution rendering of the template|
249
251
252
+
### BulletinBlock
253
+
`TRMS\Carousel\Models\BulletinBlock`
254
+
255
+
A BulletinBlock is an area of content within a `Bulletin` or a `Template`. Blocks can be `Text`, `Picture`, `Video`, or `WebPicture`. Text blocks are just that, blocks containing text. Picture and Video blocks will take a Media Object. WebPicture blocks take the URL of an image. There are many properties on a block some of which apply to only one of the four `BlockType`s. Many have several properties that are used to make an effect, like a drop shadow or a text glow.
256
+
#### Methods
257
+
|Method|Parameters|Returns|Description|
258
+
|------|----------|-------|-----------|
259
+
|setMedia|Media Object|self - chainable|Sets the Media to be used in this model and sets the `blockType` to the corresponding Media type.|
260
+
|getMedia|none|Media Object|Gets the related Media model.|
261
+
#### Properties
262
+
|Property|type|Description|
263
+
|--------|----|-----------|
264
+
BlockType|enumerable|Indicates the type of the block: `Rectangle`, `Ellipse`, `Text`, `Picture`, `WebPicture`, `Video`|
265
+
Name|string|The name of the block|
266
+
|**Size and Position**|
267
+
X|int|The x coordinate of the upper left corner of the block.|
268
+
Y|int|The y coordinate of the upper left corner of the block.|
269
+
Width|int|The width in pixels of the block.|
270
+
Height|int|The height in pixels of the block.|
271
+
RotateDegrees:|int|The rotation of the block in degrees|
272
+
|**Text Basic**|
273
+
Text|string|The text to be displayed in a text block|
274
+
AutoSizeText|boolean|If the block should auto size the text to fill the available block. If false the `TextSize` will be used|
275
+
TextSize|int|The font size in points|
276
+
|**Text Style**|
277
+
TextFont|string|The font name of an installed font. (this is a relationship, getting the installed fonts is not currently supported in this package)|
278
+
TextBold|boolean|Bold styling|
279
+
TextItalic|boolean|Italic styling|
280
+
TextStrikeout|boolean|Strikeout styling|
281
+
TextUnderline|boolean|Underline styling|
282
+
|**Text Color**|
283
+
TextColor|css color value|The text color|
284
+
TextColorOpacity|float 0-1|The opacity of the text|
285
+
|**Text Alignment**|
286
+
TextHorizAlignment|enumerable|The horizontal alignment of the text: `Near`,`Far`,`Center`|
287
+
TextVertAlignment|enumerable|The horizontal alignment of the text: `Near`,`Far`,`Center`|
288
+
TextRightToLeft|boolean|Draw the text right to left|
289
+
TextWrap|boolean|Should the text line wrap|
290
+
|**Text Gradient Fill**|
291
+
TextGradient|boolean|Enable text gradient|
292
+
TextGradientColor|css color value|The color of the gradient|
293
+
TextGradientMode|enumerable|The direction of the gradient: `Horizontal`,`Vertical`,`ForwardDiagonal`,`BackwardDiagonal`|
294
+
TextGradientOpacity|float 0-1|The opacity of the gradient|
295
+
|**Text Stroke**|
296
+
TextOutline|boolean|Enable text stroke|
297
+
TextOutlineColor|css color value|The color of the stroke|
298
+
TextOutlineOpacity|float 0-1|The opacity of the stroke|
299
+
|**Text Drop Shadow**|
300
+
TextShadow|boolean|Enable text shadow|
301
+
TextShadowColor|css color value|The color of the shadow|
302
+
TextShadowDepth|int|Value in pixels of the shadow depth|
303
+
TextShadowOpacity|float 0-1|The opacity of the shadow|
304
+
|**Text Glow**|
305
+
TextGlow|boolean|Enable text glow|
306
+
TextGlowColor|css color value|The color of the text glow|
307
+
|**Block Color Fill**|
308
+
RectColor|css color value|The background fill of the block|
309
+
RectColorOpacity|float 0-1|The opacity of the fill|
310
+
|**Block Gradient**|
311
+
RectGradient||boolean|Enable block gradient|
312
+
RectGradientColor|css color value|The color of the gradient|
313
+
RectGradientMode|enumerable|The direction of the gradient: `Horizontal`,`Vertical`,`ForwardDiagonal`,`BackwardDiagonal`|
314
+
RectGradientOpacity|float 0-1|The opacity of the gradient|
315
+
|**Block Stroke**|
316
+
RectOutline|boolean|Enable block stroke|
317
+
RectOutlineColor|css color value|The color of the stroke|
318
+
RectOutlineWidth|int|The width in pixels of the stroke|
319
+
RectOutlineOpacity|float 0-1|The opacity of the stroke|
320
+
|**Block Drop Shadow**|
321
+
RectShadow|boolean|Enable block shadow|
322
+
RectShadowColor|css color value|The color of the shadow|
323
+
RectShadowDepth|int|Value in pixels of the shadow depth|
324
+
RectShadowOpacity|float 0-1|The opacity of the shadow|
325
+
|**Block Reflection**|
326
+
Reflection|boolean|Enable block reflection|
327
+
ReflectionOffset|int|Value in pixels of the reflection offset|
328
+
ReflectionHeight|int|Value in pixels of the reflection height|
329
+
ReflectionOpacity|float 0-1|The opacity of the reflection|
330
+
|**Picture Block**|
331
+
HorizAlignment|enumerable|The horizontal position of the image in the block: `Left`,`Center`,`Right`|
332
+
VertAlignment|enumerable|The vertical position of the image in the block: `Top`,`Center`,`Bottom`|
333
+
MaintainAspectRatio|boolean|Should the image stretch to fill the block|
0 commit comments